Index: /branches/numpy_misc/tools/acceptance_tests/README
===================================================================
--- /branches/numpy_misc/tools/acceptance_tests/README	(revision 7046)
+++ /branches/numpy_misc/tools/acceptance_tests/README	(revision 7047)
@@ -18,4 +18,5 @@
 contains a single directory path to the ANUGA code.  Something like
 /nas/gemd/georisk_models/inundation/sandpits/rwilson/rwilson/branches/numpy
+(only needed by the test_test_all.py module)
 
 EQRMPATH
Index: /branches/numpy_misc/tools/acceptance_tests/test_offsite.py
===================================================================
--- /branches/numpy_misc/tools/acceptance_tests/test_offsite.py	(revision 7047)
+++ /branches/numpy_misc/tools/acceptance_tests/test_offsite.py	(revision 7047)
@@ -0,0 +1,105 @@
+#!/bin/env python
+
+'''Run acceptance tests in order.
+
+Only run tests that don't need any compute nodes.
+'''
+
+import os
+import sys
+import time
+import shutil
+import test_utils as util
+
+
+# the test files, in desired order
+Tests = ['test_dump_python_environment.py',
+         'test_python_packages.py',
+#         'test_filesystem_accessibility.py',
+         'test_ssh_to_compute_nodes.py',
+#         'test_quadrature_parallel_interleaved.py',
+#         'test_latency_bandwidth.py',
+#         'test_test_pypar.py',
+#         'test_inter_latency.py',
+         'test_test_all.py',
+         'test_eqrm.py',
+        ]
+
+
+if __name__ == '__main__':
+    home_directory = os.getcwd()
+    logfile = os.path.join(home_directory, 'test.log')
+    if len(sys.argv) > 1:
+        logfile = sys.argv[1]
+
+    try:
+        os.remove(logfile)
+    except:
+        pass
+
+    # make sure we are running on a cluster machine
+    (hostname, _) = util.get_hostname()
+    cluster_info = util.get_cluster_info(hostname)
+    if cluster_info is None:
+        util.log_print_nl(logfile,
+                          'Sorry, you must be running on a cluster master node.')
+        util.log_print_nl(logfile, "You are on machine '%s'." % hostname)
+        sys.exit(10)
+
+    # copy machines_<name> files from here to ~
+    home = os.getenv('HOME')
+    if not home:
+        util.log_print_nl(logfile, "Sorry, you don't have the 'HOME' environment variable set.")
+        sys.exit(10)
+    machine_file = 'machines_%s' % hostname
+    shutil.copyfile(machine_file, os.path.join(home, '.'+machine_file))
+
+    # make sure environment variables are set
+    python = os.getenv('PYTHON')
+    pythonpath = os.getenv('PYTHONPATH')
+    eqrmpath = os.getenv('EQRMPATH')
+    if eqrmpath is None:
+        eqrmpath = ''
+    if not python or not pythonpath:
+        if not python:
+            util.log_print_nl(logfile, 'Sorry, you must set the PYTHON environment variable.')
+        if not pythonpath:
+            util.log_print_nl(logfile, 'Sorry, you must set the PYTHONPATH environment variable.')
+        sys.exit(10)
+
+    # make sure all OK with user
+    print '*' * 80
+    print '* Acceptance test for %s cluster' % hostname
+    print '*' * 80
+    print ''
+    print 'PYTHON=%s' % python
+    print 'PYTHONPATH=%s' % pythonpath
+    print 'EQRMPATH=%s' % eqrmpath
+    print ''
+    res = raw_input('This test will run with the above environment variables, OK? ')
+    if len(res) == 0 or res[0].upper() != 'Y':
+        sys.exit(10)
+    print ''
+
+    # put header on log
+    util.log_nl(logfile, '#' * 80)
+    util.log_nl(logfile, '# Acceptance test of cluster %s' % hostname)
+    util.log_nl(logfile, '#' * 80)
+    util.log_nl(logfile)
+
+    # run the tests
+    for test_module in Tests:
+        (import_name, _) = test_module.split('.', 1)
+        import_code = 'import %s as test' % import_name
+
+        exec import_code
+
+        start_time = time.time()
+        test_name = test.name
+        util.header(logfile, test_module, '%s on %s.' % (test_name, hostname))
+        #test_code = ("test.test('%s')" % logfile)
+
+        test.test(logfile)
+        #exec test_code
+
+        util.footer(logfile, start_time)
