have test.py return status
authorCraig Dowell <craigdo@ee.washington.edu>
Thu Oct 01 11:53:19 2009 -0700 (4 months ago)
changeset 53509f457bebbcf4
parent 5349 8e8459d1831b
child 5351 6abced63cd7f
have test.py return status
test.py
     1.1 --- a/test.py	Thu Oct 01 17:38:21 2009 +0400
     1.2 +++ b/test.py	Thu Oct 01 11:53:19 2009 -0700
     1.3 @@ -1054,6 +1054,11 @@
     1.4      if len(options.xml):
     1.5          shutil.copyfile(xml_results_file, options.xml)
     1.6  
     1.7 +    if passed_tests == total_tests:
     1.8 +        return 0
     1.9 +    else:
    1.10 +        return -1
    1.11 +
    1.12  def main(argv):
    1.13      random.seed()
    1.14  
    1.15 @@ -1100,8 +1105,8 @@
    1.16      global options
    1.17      options = parser.parse_args()[0]
    1.18      signal.signal(signal.SIGINT, sigint_hook)
    1.19 -    run_tests()
    1.20 -    return 0
    1.21 +    
    1.22 +    return run_tests()
    1.23  
    1.24  if __name__ == '__main__':
    1.25      sys.exit(main(sys.argv))