Changeset 6996
- Timestamp:
- May 7, 2009, 4:21:17 PM (16 years ago)
- 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 1 3 """This module will compile the necessary c-extensions for the mandelbrot demos 2 4 """ -
branches/numpy_misc/tools/acceptance_tests/test_all.py
r6992 r6996 6 6 import sys 7 7 import time 8 import shutil 8 9 import test_utils as util 9 10 … … 40 41 sys.exit(10) 41 42 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 42 61 # run the tests 43 62 for test_module in Tests: -
branches/numpy_misc/tools/acceptance_tests/test_dump_python_environment.py
r6993 r6996 33 33 python_version = fd.read() 34 34 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', ' ')) 36 37 util.log_print_nl(logfile) 37 38 … … 41 42 util.log_print_nl(logfile) 42 43 43 # show contents of ~/.machines_<machine>44 # show contents of ./machines_<machine> 44 45 home = os.getenv('HOME') 45 46 machines_file = os.path.join(home, '.machines_%s' % cluster) -
branches/numpy_misc/tools/acceptance_tests/test_filesystem_accessibility.py
r6993 r6996 21 21 util.header(logfile, 'Test of filesystem accessibility on %s.' % cluster) 22 22 # get python to run 23 python_env_var = os.getenv('PYTHON' , 'python')23 python_env_var = os.getenv('PYTHON') 24 24 25 25 # get max width of the filesystem paths -
branches/numpy_misc/tools/acceptance_tests/test_latency_bandwidth.py
r6993 r6996 18 18 19 19 # get python to run 20 python_env_var = os.getenv('PYTHON' , 'python')20 python_env_var = os.getenv('PYTHON') 21 21 22 22 # compile C code … … 37 37 # run the tests 38 38 results = [] 39 machines_file = os.path.join('~', '.machines_%s' % cluster) 39 40 for num_procs in Processor_Numbers: 40 machines_file = '~/.machines_%s' % cluster41 42 41 cmd = ('mpirun -np %2d -hostfile %s %s' 43 42 % (num_procs, machines_file, obj_file)) -
branches/numpy_misc/tools/acceptance_tests/test_python_packages.py
r6993 r6996 3 3 '''Testlet to check that packages required are importable''' 4 4 5 import os 5 6 import sys 6 7 import time … … 26 27 27 28 # get python to run 28 python_env_var = os.getenv('PYTHON' , 'python')29 python_env_var = os.getenv('PYTHON') 29 30 30 31 # get max width of the import tests -
branches/numpy_misc/tools/acceptance_tests/test_quadrature_parallel_interleaved.py
r6993 r6996 18 18 19 19 # get python to run 20 python_env_var = os.getenv('PYTHON' , 'python')20 python_env_var = os.getenv('PYTHON') 21 21 22 22 # compile C code … … 37 37 # run the tests 38 38 results = [] 39 machines_file = '~/.machines_%s' % cluster39 machines_file = os.path.join('~', '.machines_%s' % cluster) 40 40 single_processor_time = None 41 41 for num_procs in Processor_Numbers: -
branches/numpy_misc/tools/acceptance_tests/test_ssh_to_compute_nodes.py
r6993 r6996 17 17 18 18 # get python to run 19 python_env_var = os.getenv('PYTHON' , 'python')19 python_env_var = os.getenv('PYTHON') 20 20 21 21 # get cluster-specific information -
branches/numpy_misc/tools/acceptance_tests/test_test_all.py
r6993 r6996 17 17 18 18 # get python to run 19 python_env_var = os.getenv('PYTHON' , 'python')19 python_env_var = os.getenv('PYTHON') 20 20 21 21 # remember the directory we are in and go to ANUGA test directory 22 22 home_directory = os.getcwd() 23 23 pythonpath = os.getenv('PYTHONPATH') 24 newpath = os.path.join(pythonpath, 'anuga') 25 os.chdir(newpath) 24 os.chdir(os.path.join(pythonpath, 'anuga')) 26 25 27 26 # compile C code 28 util.log_print_nl(logfile, '%s compile_all.py' ) % python_env_var29 (_, fd) = os.popen4('%s compile_all.py' ) % python_env_var27 util.log_print_nl(logfile, '%s compile_all.py' % python_env_var) 28 (_, fd) = os.popen4('%s compile_all.py' % python_env_var) 30 29 compile_result = fd.read() 31 30 status = fd.close() … … 33 32 34 33 # run test_all.py 35 util.log_print_nl(logfile, '%s test_all.py' ) % python_env_var36 (_, fd) = os.popen4('%s test_all.py' ) % python_env_var34 util.log_print_nl(logfile, '%s test_all.py' % python_env_var) 35 (_, fd) = os.popen4('%s test_all.py' % python_env_var) 37 36 test_result = fd.read() 38 37 status = fd.close() -
branches/numpy_misc/tools/acceptance_tests/test_test_pypar.py
r6993 r6996 17 17 util.header(logfile, 'Running pypar test on %s.' % cluster) 18 18 19 19 20 # get python to run 20 python_env_var = os.getenv('PYTHON' , 'python')21 python_env_var = os.getenv('PYTHON') 21 22 22 23 # run the test_pypar.py tests 23 machines_file = '~/.machines_%s' % cluster24 machines_file = os.path.join('~', '.machines_%s' % cluster) 24 25 for num_procs in Processor_Numbers: 25 26 cmd = ('mpirun -np %2d -hostfile %s %s test_pypar.py' … … 60 61 61 62 # run tests 62 machines_file = '~/.machines_%s' % cluster63 machines_file = os.path.join('~', '.machines_%s' % cluster) 63 64 result_data = [] 64 65 for num_procs in Processor_Numbers: -
branches/numpy_misc/tools/acceptance_tests/test_utils.py
r6992 r6996 11 11 # 'node_stem' key defines a compute node name. 12 12 # 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? 14 14 Cluster_Info = {'cyclone': {'num_nodes': 23, 15 15 'node_stem': 'compute-1-%d'},
Note: See TracChangeset
for help on using the changeset viewer.