Commits

Darrell Schiebel authored 68ab1310635
       New Development: no             JIRA Issue: no       Ready to Release: yes      Interface Changes: none What Interface Changed: none          Test Programs: none   Put in Release Notes: no

Description: changes for running tests with the new third party packages

gcwrap/python/scripts/regressions/admin/runRegressionTest.py

Modified
1 1 import os
2 2 import re
3 3 import sys
4 4 import getopt
5 5 import shutil
6 +import traceback
6 7 from publish_summary import runTest
7 8
8 9 PYVER = str(sys.version_info[0]) + "." + str(sys.version_info[1])
9 10
10 11 CASA_DIR = os.environ["CASAPATH"].split()[0]
11 12 TESTS_DIR = CASA_DIR + "/" + os.environ["CASAPATH"].split()[1] + '/lib/python' + PYVER + '/regressions/'
12 13
13 14 _potential_data_directories = ( "/opt/casa/data",
14 15 "/home/casa/data",
15 16 "/home/casa/data/trunk",
66 67
67 68 try:
68 69 # Get only this script options
69 70 opts,args=getopt.getopt(sys.argv[i+2:], "Halmgs:f:d:", ["Help","all","list","mem",
70 71 "debug","classes=","file=",
71 72 "datadir="])
72 73
73 74 except getopt.GetoptError, err:
74 75 # Print help information and exit:
75 76 print str(err) # will print something like "option -a not recognized"
76 - usage()
77 77 os._exit(2)
78 78
79 79 # List of tests to run
80 80 testnames = []
81 81
82 82 # Boolean for file with tests.
83 83 # One could allow the use of --file with specific tests given in
84 84 # the command line by removing this option and appending to the
85 85 # testnames list in the args handling
86 86 hasfile = False
87 87 alltests = False
88 88
89 89 #If no option is given, show the Help page
90 90 if opts == [] and args == []:
91 - usage()
92 - os._exit(0)
91 + print "no arguments given..."
92 + os._exit(1)
93 93
94 94
95 95 # All other options
96 96 for o, a in opts:
97 97 if o in ("-H", "--Help"):
98 98 usage()
99 99 os._exit(0)
100 100 if o in ("-l", "--list"):
101 101 list_tests()
102 102 os._exit(0)

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut