Changeset 6992


Ignore:
Timestamp:
May 7, 2009, 12:03:54 PM (11 years ago)
Author:
rwilson
Message:

Fixed bug in utils get_hostname(), added top-level test: are we a cluster?

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

Legend:

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

    r6991 r6992  
    3131        pass
    3232
     33    # make sure we are running on a cluster machine
     34    (hostname, _) = util.get_hostname()
     35    cluster_info = util.get_cluster_info(hostname)
     36    if cluster_info is None:
     37        util.log_print_nl(logfile,
     38                          'Sorry, you must be running on a cluster master node.')
     39        util.log_print_nl(logfile, "You are on machine '%s'." % hostname)
     40        sys.exit(10)
     41
    3342    # run the tests
    3443    for test_module in Tests:
  • branches/numpy_misc/tools/acceptance_tests/test_utils.py

    r6991 r6992  
    9494    try:
    9595        result = hostname.strip().split('.', 1)
     96        if len(result) < 2:
     97            result.append('')
    9698    except:
    9799        result = (hostname, '')
Note: See TracChangeset for help on using the changeset viewer.