Commit cd3a3769 authored by Alexandre Boeglin's avatar Alexandre Boeglin

Added some verbosity in case of misuse of the script.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2288 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e3d65b49
......@@ -17,6 +17,9 @@ if '__INSTANCE_HOME' not in globals().keys() :
__INSTANCE_HOME = instance_home
def runUnitTestList(test_list) :
if len(test_list) == 0 :
print "No test to run, exiting immediately."
return
os.environ['INSTANCE_HOME'] = instance_home
os.environ['SOFTWARE_HOME'] = software_home
os.environ['COPY_OF_INSTANCE_HOME'] = instance_home
......@@ -46,4 +49,8 @@ def runUnitTestList(test_list) :
TestRunner().run(suite)
if __name__ == '__main__' :
runUnitTestList(test_list=sys.argv[1:])
test_list = sys.argv[1:]
if len(test_list) == 0 :
print "Usage : %s UnitTest1 UnitTest2 ..." % sys.argv[0]
sys.exit(1)
runUnitTestList(test_list=test_list)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment