@@ -74,6 +74,7 @@ def usage():
7474 print "\t --test\t \t \t run the test suite, leaving all artifacts in %s" % p ["testDir" ]
7575 print "\t --suite [suite]\t \t run a specific test suite, leaving all artifacts in %s" % p ["testDir" ]
7676 print "\t --jython\t \t run a different test suite, with different arguments to support jython"
77+ print "\t --jython_suite [suite] \t run a different test suite, with different arguments to support jython"
7778 print "\t --coverage\t \t run the test suite with coverage analysis, leaving all artifacts in %s" % p ["testDir" ]
7879 print "\t --debug-level [info|debug]\n \t \t \t \t threshold of logging message when running tests or coverage analysis"
7980 print "\t --package\t \t package everything up into a tarball for release to sourceforge in %s" % p ["packageDir" ]
@@ -93,7 +94,7 @@ def usage():
9394 optlist , args = getopt .getopt (sys .argv [1 :],
9495 "hct" ,
9596 ["help" , "clean" , "test" , "suite=" , "debug-level=" , "coverage" , "package" , "build-stamp=" , \
96- "publish" , "register" , "jython" , \
97+ "publish" , "register" , "jython" , "jython_suite=" , \
9798 "site" , "docs-html-multi" , "docs-html-single" , "docs-pdf" , "docs-all" , "pydoc" ])
9899except getopt .GetoptError :
99100 # print help information and exit:
@@ -137,7 +138,12 @@ def test(dir, test_suite, debug_level):
137138 if not os .path .exists (dir ):
138139 os .makedirs (dir )
139140
140- _run_nose (argv = ["" , "--with-nosexunit" , "--source-folder=src" , "--where=test/springpythontest" , "--xml-report-folder=%s" % dir , test_suite ], debug_level = debug_level )
141+ try :
142+ import java
143+ if test_suite == "checkin" : test_suite = "jython"
144+ _run_nose (argv = ["" , "--where=test/springpythontest" , test_suite ], debug_level = debug_level )
145+ except ImportError :
146+ _run_nose (argv = ["" , "--with-nosexunit" , "--source-folder=src" , "--where=test/springpythontest" , "--xml-report-folder=%s" % dir , test_suite ], debug_level = debug_level )
141147
142148def test_jython (dir , test_suite , debug_level ):
143149 """
@@ -500,13 +506,17 @@ def create_pydocs():
500506 test (p ["testDir" ], "checkin" , debug_level )
501507
502508 if option [0 ] in ("--suite" ):
503- print "Running test suite..."
509+ print "Running test suite %s ..." % option [ 1 ]
504510 test (p ["testDir" ], option [1 ], debug_level )
505511
506512 if option [0 ] in ("--jython" ):
507513 print "Running for jython..."
508514 test_jython (p ["testDir" ], "jython" , debug_level )
509515
516+ if option [0 ] in ("--jython_suite" ):
517+ print "Running jython suite %s..." % option [1 ]
518+ test_jython (p ["testDir" ], option [1 ], debug_level )
519+
510520 if option [0 ] in ("--coverage" ):
511521 test_coverage (p ["testDir" ], "checkin" , debug_level )
512522
0 commit comments