Changeset 7656


Ignore:
Timestamp:
Mar 5, 2010, 12:28:16 PM (15 years ago)
Author:
gray
Message:

Updating acceptance test files. Still pre-2010 tests.

Location:
misc/tools/acceptance_tests
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • misc/tools/acceptance_tests/README

    r7276 r7656  
    1515contains the python to execute, eg, 'python2.4', etc.
    1616
    17 PYTHONPATH
     17ANUGAPATH
    1818contains a single directory path to the ANUGA code.  Something like
    1919/nas/gemd/georisk_models/inundation/sandpits/rwilson/rwilson/branches/numpy
     
    3030   information.
    31312. Create a new 'machines_<name>' file in this directory that describes the
    32    cluster compute-node setup.  Note that the 'machines_<name>' file  doesn't
    33    appear to be used by *anything*.
     32   cluster compute-node setup.
  • misc/tools/acceptance_tests/machines_cyclone

    r7276 r7656  
    99compute-1-14 slots=2
    1010compute-1-13 slots=2
    11 compute-1-12 slots=2
     11#compute-1-12 slots=2
    1212compute-1-11 slots=2
    1313compute-1-10 slots=2
  • misc/tools/acceptance_tests/machines_tornado

    r7276 r7656  
    22compute-0-1 cpu=4
    33compute-0-2 cpu=4
    4 compute-0-3 cpu=4
     4#compute-0-3 cpu=4
    55compute-0-4 cpu=4
    66compute-0-5 cpu=4
  • misc/tools/acceptance_tests/mandelbrot/README

    r7276 r7656  
    1111To compile C extensions in this directory
    1212
    13 python compile_mandelbrot_extensions.py
    14 
    15 or
    1613python compile.py mandel_ext.c
    1714python compile.py mandelplot_ext.c
  • misc/tools/acceptance_tests/test_all.py

    r7276 r7656  
    1111
    1212# the test files, in desired order
    13 Tests = ['test_dump_python_environment.py',
     13Tests = ['test_test_all.py',
     14         'test_eqrm.py',
     15         'test_dump_python_environment.py',
    1416         'test_python_packages.py',
    1517         'test_filesystem_accessibility.py',
     
    1921         'test_test_pypar.py',
    2022#         'test_inter_latency.py',
    21          'test_test_all.py',
    22          'test_eqrm.py',
    2323        ]
    24 
    2524
    2625if __name__ == '__main__':
     
    5453    # make sure environment variables are set
    5554    python = os.getenv('PYTHON')
    56     pythonpath = os.getenv('PYTHONPATH')
    57     eqrmpath = os.getenv('EQRMPATH')
    58     if eqrmpath is None:
    59         eqrmpath = ''
    60     if not python or not pythonpath:
     55    ANUGAPATH = os.getenv('ANUGAPATH')
     56    EQRMPATH = os.getenv('EQRMPATH')
     57    if EQRMPATH is None:
     58        EQRMPATH = ''
     59    if not python or not ANUGAPATH:
    6160        if not python:
    6261            util.log_print_nl(logfile, 'Sorry, you must set the PYTHON environment variable.')
    63         if not pythonpath:
    64             util.log_print_nl(logfile, 'Sorry, you must set the PYTHONPATH environment variable.')
     62        if not ANUGAPATH:
     63            util.log_print_nl(logfile, 'Sorry, you must set the ANUGAPATH environment variable.')
    6564        sys.exit(10)
    6665
     
    7170    print ''
    7271    print 'PYTHON=%s' % python
    73     print 'PYTHONPATH=%s' % pythonpath
    74     print 'EQRMPATH=%s' % eqrmpath
     72    print 'ANUGAPATH=%s' % ANUGAPATH
     73    print 'EQRMPATH=%s' % EQRMPATH
    7574    print ''
    7675    res = raw_input('This test will run with the above environment variables, OK? ')
  • misc/tools/acceptance_tests/test_dump_python_environment.py

    r7276 r7656  
    11#!/bin/env python
    22
    3 '''Testlet to dump the acceptance environment.'''
     3"""Testlet to dump the acceptance environment."""
    44
    55import os
     
    3333    util.log_print_nl(logfile)
    3434
    35     # show PYTHONPATH value
    36     pythonpath = os.getenv('PYTHONPATH')
    37     util.log_print_nl(logfile, 'PYTHONPATH environment variable = %s' % pythonpath)
     35    # show ANUGAPATH value
     36    ANUGAPATH = os.getenv('ANUGAPATH')
     37    util.log_print_nl(logfile, 'ANUGAPATH environment variable = %s' % ANUGAPATH)
    3838
    3939    # see if we can get a revision number for ANUGA source
     
    5050
    5151    # See if we are testing EQRM
    52     eqrm_path = os.getenv('EQRMPATH')
     52    eqrm_path = os.getenv('ANUGAPATH')
    5353    if eqrm_path:
    54         util.log_print_nl(logfile, 'Environment variable EQRMPATH = %s' % eqrm_path)
     54        util.log_print_nl(logfile, 'Environment variable ANUGAPATH = %s' % eqrm_path)
    5555        util.log_print_nl(logfile, 'EQRM will be tested below.')
    5656    else:
    57         util.log_print_nl(logfile, 'Environment variable EQRMPATH not set, not testing EQRM.')
     57        util.log_print_nl(logfile, 'Environment variable ANUGAPATH not set, not testing EQRM.')
    5858    util.log_print_nl(logfile)
    5959
  • misc/tools/acceptance_tests/test_eqrm.py

    r7276 r7656  
    11#!/bin/env python
    22
    3 '''Testlet to run the EQRM 'test_all.py' script.'''
     3"Testlet to run the EQRM 'test_all.py' script."""
    44
    55import os
  • misc/tools/acceptance_tests/test_filesystem_accessibility.py

    r7276 r7656  
    11#!/bin/env python
    22
    3 '''Testlet to check that various filesystems are accessible'''
     3"""Testlet to check that various filesystems are accessible"""
    44
    55import os
  • misc/tools/acceptance_tests/test_int32_type.py

    r7276 r7656  
    1 '''
     1"""
    22This program checks the underlying type object for int32 data types.
    3 '''
     3"""
    44
    55import platform
  • misc/tools/acceptance_tests/test_inter_latency.py

    r7276 r7656  
    11#!/bin/env python
    22
    3 '''Testlet to run the internode LatencyBandwidth test.'''
     3"""Testlet to run the internode LatencyBandwidth test."""
    44
    55import os
     
    1111
    1212def get_node_connections(nodes):
    13     '''Given list of nodes, return list of all possible pairs.'''
     13    """Given list of nodes, return list of all possible pairs."""
    1414
    1515    def pair_list(l):
     
    5050    # get list of node numbers
    5151    home_env_var = os.getenv('HOME')
    52     machines_file = os.path.join(home_env_var, '.machines_%s' % cluster)
     52    #machines_file = os.path.join(home_env_var, '.machines_%s' % cluster)
    5353    nodes = util.get_node_numbers(cluster, strip_bad_nodes=True)
    5454    nodes.sort()
  • misc/tools/acceptance_tests/test_latency_bandwidth.py

    r7276 r7656  
    11#!/bin/env python
    22
    3 '''Testlet to run the LatencyBandwidth test.'''
     3"""Testlet to run the LatencyBandwidth test."""
    44
    55import os
     
    3636    # run the tests
    3737    results = []
    38     machines_file = os.path.join('~', '.machines_%s' % cluster)
     38    #machines_file = os.path.join('~', '.machines_%s' % cluster)
    3939    for num_procs in Processor_Numbers:
    4040        cmd = ('mpirun -nolocal -np %2d -hostfile %s %s'
    41                % (num_procs, machines_file, obj_file))
     41               % (num_procs, util.machines_file, obj_file))
    4242        util.log_print(logfile, cmd + ' ...')
    4343        (_, fd) = os.popen4(cmd)
  • misc/tools/acceptance_tests/test_offsite.py

    r7276 r7656  
    11#!/bin/env python
    22
    3 '''Run acceptance tests in order.
     3"""Run acceptance tests in order.
    44
    55Only run tests that don't need any compute nodes.
    6 '''
     6"""
    77
    88import os
     
    5757    # make sure environment variables are set
    5858    python = os.getenv('PYTHON')
    59     pythonpath = os.getenv('PYTHONPATH')
    60     eqrmpath = os.getenv('EQRMPATH')
    61     if eqrmpath is None:
    62         eqrmpath = ''
    63     if not python or not pythonpath:
     59    ANUGAPATH = os.getenv('ANUGAPATH')
     60    ANUGAPATH = os.getenv('ANUGAPATH')
     61    if ANUGAPATH is None:
     62        ANUGAPATH = ''
     63    if not python or not ANUGAPATH:
    6464        if not python:
    6565            util.log_print_nl(logfile, 'Sorry, you must set the PYTHON environment variable.')
    66         if not pythonpath:
    67             util.log_print_nl(logfile, 'Sorry, you must set the PYTHONPATH environment variable.')
     66        if not ANUGAPATH:
     67            util.log_print_nl(logfile, 'Sorry, you must set the ANUGAPATH environment variable.')
    6868        sys.exit(10)
    6969
     
    7474    print ''
    7575    print 'PYTHON=%s' % python
    76     print 'PYTHONPATH=%s' % pythonpath
    77     print 'EQRMPATH=%s' % eqrmpath
     76    print 'ANUGAPATH=%s' % ANUGAPATH
     77    print 'ANUGAPATH=%s' % ANUGAPATH
    7878    print ''
    7979    res = raw_input('This test will run with the above environment variables, OK? ')
  • misc/tools/acceptance_tests/test_python_packages.py

    r7276 r7656  
    11#!/bin/env python
    22
    3 '''Testlet to check that packages required are importable'''
     3"""Testlet to check that packages required are importable"""
    44
    55import os
  • misc/tools/acceptance_tests/test_quadrature_parallel_interleaved.py

    r7276 r7656  
    11#!/bin/env python
    22
    3 '''Testlet to run the QuadratureParallelInterleaved test.'''
     3"""Testlet to run the QuadratureParallelInterleaved test."""
    44
    55import os
     
    3636    # run the tests
    3737    results = []
    38     machines_file = os.path.join('~', '.machines_%s' % cluster)
     38    #machines_file = os.path.join('~', '.machines_%s' % cluster)
     39    #machines_file = os.path.join('machines_%s' % cluster)
    3940    single_processor_time = None
    4041    for num_procs in Processor_Numbers:
    4142        cmd = ('mpirun -nolocal -np %2d -hostfile %s %s'
    42                % (num_procs, machines_file, obj_file))
     43               % (num_procs, util.machines_file, obj_file))
    4344        util.log_print(logfile, cmd + ' ...')
    4445        (_, fd) = os.popen4(cmd)
  • misc/tools/acceptance_tests/test_ssh_to_compute_nodes.py

    r7276 r7656  
    11#!/bin/env python
    22
    3 '''Testlet to check that can ssh to each subordinate node of the cluster.'''
     3"""Testlet to check that can ssh to each subordinate node of the cluster."""
    44
    55import os
  • misc/tools/acceptance_tests/test_test_all.py

    r7276 r7656  
    11#!/bin/env python
    22
    3 '''Testlet to run the 'test_all.py' ANUGA script.'''
     3"""Testlet to run the 'test_all.py' ANUGA script."""
    44
    55import os
     
    1919    # remember the directory we are in and go to ANUGA test directory
    2020    home_directory = os.getcwd()
    21     pythonpath = os.getenv('PYTHONPATH')
    22     os.chdir(os.path.join(pythonpath, 'anuga'))
     21    ANUGAPATH = os.getenv('ANUGAPATH')
     22    os.chdir(os.path.join(ANUGAPATH, 'anuga'))
    2323
    2424    # compile C code
  • misc/tools/acceptance_tests/test_test_pypar.py

    r7276 r7656  
    11#!/bin/env python
    22
    3 '''Testlet to run the pypar tests.'''
     3"""Testlet to run the pypar tests."""
    44
    55import os
     
    2020
    2121    # run the test_pypar.py tests
    22     machines_file = os.path.join('~', '.machines_%s' % cluster)
     22    #machines_file = os.path.join('~', '.machines_%s' % cluster)
    2323    for num_procs in Processor_Numbers:
    2424        cmd = ('mpirun -nolocal -np %2d -hostfile %s %s test_pypar.py'
    25                % (num_procs, machines_file, python_env_var))
     25               % (num_procs, util.machines_file, python_env_var))
    2626        util.log_print(logfile, cmd + ' ...')
    2727        fd = os.popen(cmd)
     
    4848    os.chdir('mandelbrot')
    4949   
    50     cmd = '%s compile_mandelbrot_c_extensions.py' % python_env_var
     50    cmd = '%s compile.py mandel_ext.c' % python_env_var
    5151    util.log_print_nl(logfile, cmd)
    5252    fd = os.popen(cmd)
     
    5656    if status:
    5757        return False
    58 
     58   
     59    cmd = '%s compile.py mandelplot_ext.c' % python_env_var
     60    util.log_print_nl(logfile, cmd)
     61    fd = os.popen(cmd)
     62    compile_result = fd.read()
     63    status = fd.close()
     64    util.log_print(logfile, compile_result)
     65    if status:
     66        return False
     67   
    5968    # run tests
    60     machines_file = os.path.join('~', '.machines_%s' % cluster)
     69    machines_file = os.path.join('..', util.machines_file)
    6170    result_data = []
    6271    for num_procs in Processor_Numbers:
  • misc/tools/acceptance_tests/test_utils.py

    r7276 r7656  
    11#!/bin/env python
    22
    3 '''Utility functions for the cluster acceptance test suite.'''
     3"""Utility functions for the cluster acceptance test suite."""
    44
    55import os
     
    1414Cluster_Info = {'cyclone': {'num_nodes': 23,
    1515                            'node_stem': 'compute-1-%d',
    16                             'bad_nodes': [13]},
     16                            'bad_nodes': [12]},
    1717                # 13 bad - 'no route to host'
    1818                'tornado': {'num_nodes': 20,
    1919                            'node_stem': 'compute-0-%d',
    20                             'bad_nodes': []},
     20                            'bad_nodes': [3]},
    2121                'off_site': {'num_nodes': 1,
    2222                             'node_stem': 'xyzzy-%d',
     
    2626
    2727def log(logfile, msg=''):
    28     '''Write a message to the log file.'''
     28    """Write a message to the log file."""
    2929
    3030    fd = open(logfile, 'a')
     
    3434
    3535def log_nl(logfile, msg=''):
    36     '''Write a message to the log file, with a newline added.'''
     36    """Write a message to the log file, with a newline added."""
    3737
    3838    log(logfile, msg)
     
    4141
    4242def log_print(logfile, msg=''):
    43     '''Write a message to the log file and stdout.
     43    """Write a message to the log file and stdout.
    4444
    4545    The message doesn't have a '\n' added to it.
    46     '''
     46    """
    4747
    4848    log(logfile, msg)
     
    5252
    5353def log_print_nl(logfile, msg=''):
    54     '''Write a message to the log file and stdout, with a newline added.
     54    """Write a message to the log file and stdout, with a newline added.
    5555
    5656    Appends '\n' to msg.
    57     '''
     57    """
    5858
    5959    log_nl(logfile, msg)
     
    6363
    6464def header(logfile, module, msg):
    65     '''Write testlet header to log and stdout.'''
     65    """Write testlet header to log and stdout."""
    6666
    6767    # current time
     
    7676
    7777def footer(logfile, start_time=None):
    78     '''Write testlet footer to log and stdout.'''
     78    """Write testlet footer to log and stdout."""
    7979
    8080    if start_time:
     
    9090
    9191def get_hostname():
    92     '''Return (<host>, <domain>) for machine.
     92    """Return (<host>, <domain>) for machine.
    9393
    9494    For example, on the GA cyclone main node, return ('cyclone', 'agso.gov.au').
    95     '''
     95    """
    9696
    9797    fd = os.popen('hostname')
     
    110110
    111111def get_cluster_info(cluster):
    112     '''Get dictionary containing information for 'cluster'.
     112    """Get dictionary containing information for 'cluster'.
    113113
    114114    If 'cluster' is not recognized, return None.
    115     '''
     115    """
    116116
    117117    return Cluster_Info.get(cluster, None)
     
    119119
    120120def get_node_numbers(cluster, strip_bad_nodes=True):
    121     '''Get a list of node numbers for the cluster.
     121    """Get a list of node numbers for the cluster.
    122122
    123123    If 'strip_bad_nodes' is True remove bad nodes from the result.
    124     '''
     124    """
    125125
    126126    result = []
     
    133133    return result
    134134
    135 
     135# Using the local machines file
     136(cluster, domain) = get_hostname()
     137machines_file = os.path.join('machines_%s' % cluster)
Note: See TracChangeset for help on using the changeset viewer.