Changeset 6993


Ignore:
Timestamp:
May 7, 2009, 1:32:46 PM (11 years ago)
Author:
rwilson
Message:

Changes to run specified version of python.

Location:
branches/numpy_misc/tools/acceptance_tests
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/numpy_misc/tools/acceptance_tests/test_dump_python_environment.py

    r6991 r6993  
    2020    util.log_print_nl(logfile)
    2121
     22    # show value of PYTHON environment variable
     23    python_env_var = os.getenv('PYTHON', '')
     24    util.log_print_nl(logfile, 'PYTHON environment variable = %s' % python_env_var)
     25    if python_env_var == '':
     26        util.log_print_nl(logfile, "Assume 'export PYTHON=python'")
     27    util.log_print_nl(logfile)
     28    python_env_var = os.getenv('PYTHON', 'python')
     29
    2230    # show python version being used
     31    cmd = '%s -c "import sys;print sys.version"' % python_env_var
     32    fd = os.popen(cmd, 'r')
     33    python_version = fd.read()
     34    fd.close()
    2335    util.log_print_nl(logfile, 'Python version: %s' % sys.version.replace('\n', ' '))
    2436    util.log_print_nl(logfile)
     
    2638    # show PYTHONPATH value
    2739    pythonpath = os.getenv('PYTHONPATH')
    28     util.log_print_nl(logfile, 'PYTHONPATH: %s' % pythonpath)
     40    util.log_print_nl(logfile, 'PYTHONPATH environment variable = %s' % pythonpath)
    2941    util.log_print_nl(logfile)
    3042
  • branches/numpy_misc/tools/acceptance_tests/test_filesystem_accessibility.py

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

    r6991 r6993  
    1616
    1717    util.header(logfile, 'Running latency/bandwidth test on %s.' % cluster)
     18
     19    # get python to run
     20    python_env_var = os.getenv('PYTHON', 'python')
    1821
    1922    # compile C code
  • branches/numpy_misc/tools/acceptance_tests/test_python_packages.py

    r6991 r6993  
    2424
    2525    util.header(logfile, 'Test if python packages are importable on %s.' % cluster)
     26
     27    # get python to run
     28    python_env_var = os.getenv('PYTHON', 'python')
    2629
    2730    # get max width of the import tests
  • branches/numpy_misc/tools/acceptance_tests/test_quadrature_parallel_interleaved.py

    r6991 r6993  
    1616
    1717    util.header(logfile, 'Running quadrature parallel interleaved test on %s.' % cluster)
     18
     19    # get python to run
     20    python_env_var = os.getenv('PYTHON', 'python')
    1821
    1922    # compile C code
  • branches/numpy_misc/tools/acceptance_tests/test_ssh_to_compute_nodes.py

    r6991 r6993  
    1515
    1616    util.header(logfile, 'Test of compute-node accessibility via ssh on %s.' % cluster)
     17
     18    # get python to run
     19    python_env_var = os.getenv('PYTHON', 'python')
    1720
    1821    # get cluster-specific information
  • branches/numpy_misc/tools/acceptance_tests/test_test_all.py

    r6991 r6993  
    1616    util.header(logfile, 'Running ANUGA test_all.py on %s.' % cluster)
    1717
     18    # get python to run
     19    python_env_var = os.getenv('PYTHON', 'python')
     20
    1821    # remember the directory we are in and go to ANUGA test directory
    1922    home_directory = os.getcwd()
     
    2326
    2427    # compile C code
    25     util.log_print_nl(logfile, 'python compile_all.py')
    26     (_, fd) = os.popen4('python compile_all.py')
     28    util.log_print_nl(logfile, '%s compile_all.py') % python_env_var
     29    (_, fd) = os.popen4('%s compile_all.py')  % python_env_var
    2730    compile_result = fd.read()
    2831    status = fd.close()
     
    3033
    3134    # run test_all.py
    32     util.log_print_nl(logfile, 'python test_all.py')
    33     (_, fd) = os.popen4('python 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
    3437    test_result = fd.read()
    3538    status = fd.close()
  • branches/numpy_misc/tools/acceptance_tests/test_test_pypar.py

    r6991 r6993  
    1717    util.header(logfile, 'Running pypar test on %s.' % cluster)
    1818
     19    # get python to run
     20    python_env_var = os.getenv('PYTHON', 'python')
     21
    1922    # run the test_pypar.py tests
    2023    machines_file = '~/.machines_%s' % cluster
    2124    for num_procs in Processor_Numbers:
    22         cmd = ('mpirun -np %2d -hostfile %s python test_pypar.py'
    23                % (num_procs, machines_file))
     25        cmd = ('mpirun -np %2d -hostfile %s %s test_pypar.py'
     26               % (num_procs, machines_file, python_env_var))
    2427        util.log_print(logfile, cmd + ' ...')
    2528        fd = os.popen(cmd)
     
    4649    home_directory = os.getcwd()
    4750    os.chdir('mandelbrot')
    48    
    49     util.log_print_nl(logfile, 'python compile_mandelbrot_c_extensions.py')
    50     fd = os.popen('python compile_mandelbrot_c_extensions.py')
     51   
     52    cmd = '%s compile_mandelbrot_c_extensions.py' % python_env_var
     53    util.log_print_nl(logfile, cmd)
     54    fd = os.popen(cmd)
    5155    compile_result = fd.read()
    5256    status = fd.close()
     
    5963    result_data = []
    6064    for num_procs in Processor_Numbers:
    61         cmd = ('mpirun -np %2d -hostfile %s python mandel_parallel_cyclic.py'
    62                % (num_procs, machines_file))
     65        cmd = ('mpirun -np %2d -hostfile %s %s mandel_parallel_cyclic.py'
     66               % (num_procs, machines_file, python_env_var))
    6367        util.log_print(logfile, cmd + ' ...')
    6468        fd = os.popen(cmd)
Note: See TracChangeset for help on using the changeset viewer.