Changeset 6996


Ignore:
Timestamp:
May 7, 2009, 4:21:17 PM (16 years ago)
Author:
rwilson
Message:

Changes to allow for python 2.4 and 2.5 testing.

Location:
branches/numpy_misc/tools/acceptance_tests
Files:
2 added
11 edited

Legend:

Unmodified
Added
Removed
  • branches/numpy_misc/tools/acceptance_tests/mandelbrot/compile_mandelbrot_c_extensions.py

    r6991 r6996  
     1#!/usr/bin/env python
     2
    13"""This module will compile the necessary c-extensions for the mandelbrot demos
    24"""
  • branches/numpy_misc/tools/acceptance_tests/test_all.py

    r6992 r6996  
    66import sys
    77import time
     8import shutil
    89import test_utils as util
    910
     
    4041        sys.exit(10)
    4142
     43    # copy machines_<name> files from here to ~
     44    home = os.getenv('HOME')
     45    if not home:
     46        util.log_print_nl(logfile, "Sorry, you don't have the 'HOME' environment variable set.")
     47        sys.exit(10)
     48    machine_file = 'machines_%s' % hostname
     49    shutil.copyfile(machine_file, os.path.join(home, '.'+machine_file))
     50
     51    # make sure environment variables are set
     52    python = os.getenv('PYTHON')
     53    pythonpath = os.getenv('PYTHONPATH')
     54    if not python or not pythonpath:
     55        if not python:
     56            util.log_print_nl(logfile, 'Sorry, you must set the PYTHON environment variable.')
     57        if not pythonpath:
     58            util.log_print_nl(logfile, 'Sorry, you must set the PYTHONPATH environment variable.')
     59        sys.exit(10)
     60
    4261    # run the tests
    4362    for test_module in Tests:
  • branches/numpy_misc/tools/acceptance_tests/test_dump_python_environment.py

    r6993 r6996  
    3333    python_version = fd.read()
    3434    fd.close()
    35     util.log_print_nl(logfile, 'Python version: %s' % sys.version.replace('\n', ' '))
     35    util.log_print_nl(logfile, "Executing '$PYTHON' gives version: %s" % sys.version.replace('\n', ' '))
     36#    util.log_print_nl(logfile, 'Python version: %s' % sys.version.replace('\n', ' '))
    3637    util.log_print_nl(logfile)
    3738
     
    4142    util.log_print_nl(logfile)
    4243
    43     # show contents of ~/.machines_<machine>
     44    # show contents of ./machines_<machine>
    4445    home = os.getenv('HOME')
    4546    machines_file = os.path.join(home, '.machines_%s' % cluster)
  • branches/numpy_misc/tools/acceptance_tests/test_filesystem_accessibility.py

    r6993 r6996  
    2121    util.header(logfile, 'Test of filesystem accessibility on %s.' % cluster)
    2222    # get python to run
    23     python_env_var = os.getenv('PYTHON', 'python')
     23    python_env_var = os.getenv('PYTHON')
    2424
    2525    # get max width of the filesystem paths
  • branches/numpy_misc/tools/acceptance_tests/test_latency_bandwidth.py

    r6993 r6996  
    1818
    1919    # get python to run
    20     python_env_var = os.getenv('PYTHON', 'python')
     20    python_env_var = os.getenv('PYTHON')
    2121
    2222    # compile C code
     
    3737    # run the tests
    3838    results = []
     39    machines_file = os.path.join('~', '.machines_%s' % cluster)
    3940    for num_procs in Processor_Numbers:
    40         machines_file = '~/.machines_%s' % cluster
    41 
    4241        cmd = ('mpirun -np %2d -hostfile %s %s'
    4342               % (num_procs, machines_file, obj_file))
  • branches/numpy_misc/tools/acceptance_tests/test_python_packages.py

    r6993 r6996  
    33'''Testlet to check that packages required are importable'''
    44
     5import os
    56import sys
    67import time
     
    2627
    2728    # get python to run
    28     python_env_var = os.getenv('PYTHON', 'python')
     29    python_env_var = os.getenv('PYTHON')
    2930
    3031    # get max width of the import tests
  • branches/numpy_misc/tools/acceptance_tests/test_quadrature_parallel_interleaved.py

    r6993 r6996  
    1818
    1919    # get python to run
    20     python_env_var = os.getenv('PYTHON', 'python')
     20    python_env_var = os.getenv('PYTHON')
    2121
    2222    # compile C code
     
    3737    # run the tests
    3838    results = []
    39     machines_file = '~/.machines_%s' % cluster
     39    machines_file = os.path.join('~', '.machines_%s' % cluster)
    4040    single_processor_time = None
    4141    for num_procs in Processor_Numbers:
  • branches/numpy_misc/tools/acceptance_tests/test_ssh_to_compute_nodes.py

    r6993 r6996  
    1717
    1818    # get python to run
    19     python_env_var = os.getenv('PYTHON', 'python')
     19    python_env_var = os.getenv('PYTHON')
    2020
    2121    # get cluster-specific information
  • branches/numpy_misc/tools/acceptance_tests/test_test_all.py

    r6993 r6996  
    1717
    1818    # get python to run
    19     python_env_var = os.getenv('PYTHON', 'python')
     19    python_env_var = os.getenv('PYTHON')
    2020
    2121    # remember the directory we are in and go to ANUGA test directory
    2222    home_directory = os.getcwd()
    2323    pythonpath = os.getenv('PYTHONPATH')
    24     newpath = os.path.join(pythonpath, 'anuga')
    25     os.chdir(newpath)
     24    os.chdir(os.path.join(pythonpath, 'anuga'))
    2625
    2726    # compile C code
    28     util.log_print_nl(logfile, '%s compile_all.py') % python_env_var
    29     (_, fd) = os.popen4('%s compile_all.py')  % python_env_var
     27    util.log_print_nl(logfile, '%s compile_all.py' % python_env_var)
     28    (_, fd) = os.popen4('%s compile_all.py' % python_env_var)
    3029    compile_result = fd.read()
    3130    status = fd.close()
     
    3332
    3433    # run test_all.py
    35     util.log_print_nl(logfile, '%s test_all.py') % python_env_var
    36     (_, fd) = os.popen4('%s test_all.py') % python_env_var
     34    util.log_print_nl(logfile, '%s test_all.py' % python_env_var)
     35    (_, fd) = os.popen4('%s test_all.py' % python_env_var)
    3736    test_result = fd.read()
    3837    status = fd.close()
  • branches/numpy_misc/tools/acceptance_tests/test_test_pypar.py

    r6993 r6996  
    1717    util.header(logfile, 'Running pypar test on %s.' % cluster)
    1818
     19
    1920    # get python to run
    20     python_env_var = os.getenv('PYTHON', 'python')
     21    python_env_var = os.getenv('PYTHON')
    2122
    2223    # run the test_pypar.py tests
    23     machines_file = '~/.machines_%s' % cluster
     24    machines_file = os.path.join('~', '.machines_%s' % cluster)
    2425    for num_procs in Processor_Numbers:
    2526        cmd = ('mpirun -np %2d -hostfile %s %s test_pypar.py'
     
    6061
    6162    # run tests
    62     machines_file = '~/.machines_%s' % cluster
     63    machines_file = os.path.join('~', '.machines_%s' % cluster)
    6364    result_data = []
    6465    for num_procs in Processor_Numbers:
  • branches/numpy_misc/tools/acceptance_tests/test_utils.py

    r6992 r6996  
    1111# 'node_stem' key defines a compute node name.
    1212# update this if adding a new cluster.
    13 # should get this from the ~/.machines_<cluster> file?
     13# should get this from the machines_<cluster> file?
    1414Cluster_Info = {'cyclone': {'num_nodes': 23,
    1515                            'node_stem': 'compute-1-%d'},
Note: See TracChangeset for help on using the changeset viewer.