~nmu-sscheel/gtg/rework-task-editor

« back to all changes in this revision

Viewing changes to run-tests

  • Committer: Bertrand Rousseau
  • Date: 2012-05-09 22:33:25 UTC
  • mfrom: (1178 trunk)
  • mto: This revision was merged to the branch mainline in revision 1179.
  • Revision ID: bertrand.rousseau@gmail.com-20120509223325-a53d8nwo0x9g93bc
Merge nimit branch and trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
from GTG.tests import test_suite
27
27
from GTG.tools.testingmode import TestingMode
 
28
from GTG.tools.import_liblarch import import_liblarch
28
29
 
29
30
TEST_MODULE_PREFIX = "GTG.tests."
30
31
 
41
42
        print "./run_tests  [function_path ..] to run the selected " + \
42
43
              "functions as tests"
43
44
        return
 
45
    # fake modules that mimic the behaviour of external libraries ...
 
46
    TestingMode().set_testing_mode(True)
44
47
    if args:
45
48
        #if we have specified the name of the test in the command line
46
49
        suites = []
47
 
        # fake modules that mimic the behaviour of external libraries ...
48
 
        TestingMode().set_testing_mode(True)
49
50
        for arg in args:
50
51
            #each arg can be a module name (as test_liblarch), or a module name
51
52
            # "dot" a function name (as test_liblarch.test_something)
89
90
        return 1
90
91
 
91
92
if __name__ == '__main__':
92
 
    sys.exit(main(sys.argv[1:]))
 
93
    if import_liblarch():
 
94
        sys.exit(main(sys.argv[1:]))