فهرست منبع

[core] Fix test runner return code

Romain Rigaux 12 سال پیش
والد
کامیت
76abc78
1فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 5 5
      desktop/core/src/desktop/management/commands/test.py

+ 5 - 5
desktop/core/src/desktop/management/commands/test.py

@@ -42,7 +42,7 @@ class Command(BaseCommand):
                  Additional arguments are passed to nose.
                  Additional arguments are passed to nose.
 
 
       fast       Runs the "fast" tests, namely those that don't start Hadoop.
       fast       Runs the "fast" tests, namely those that don't start Hadoop.
-              
+
       specific   Explicitly run specific tests using nose.
       specific   Explicitly run specific tests using nose.
                  For example, to run all the filebrower tests or
                  For example, to run all the filebrower tests or
                  to run a specific test function, use
                  to run a specific test function, use
@@ -100,8 +100,8 @@ class Command(BaseCommand):
       test_runner = TestRunner(verbosity=1, interactive=False)
       test_runner = TestRunner(verbosity=1, interactive=False)
       nose_args.remove(args[0])
       nose_args.remove(args[0])
       ret = test_runner.run_tests(nose_args)
       ret = test_runner.run_tests(nose_args)
-    
-    if ret:
-      logging.info("Tests (%s) returned %s" % (' '.join(nose_args), ret))
-    else:
+
+    logging.info("Tests (%s) returned %s" % (' '.join(nose_args), ret))
+
+    if ret != 0:
       sys.exit(1)
       sys.exit(1)