Patchwork scripts/oe-selftest: return based on the test results

login
register
mail settings
Submitter Stanacar, StefanX
Date Feb. 7, 2014, 10:08 a.m.
Message ID <1391767731-10158-1-git-send-email-stefanx.stanacar@intel.com>
Download mbox | patch
Permalink /patch/66481/
State New
Headers show

Comments

Stanacar, StefanX - Feb. 7, 2014, 10:08 a.m.
Regardless if the tests passed or not the script returned 0,
which isn't what one would expect.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
 scripts/oe-selftest | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index 29fe010..8c4ea92 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -144,8 +144,10 @@  def main():
     add_include()
     result = runner.run(suite)
     log.info("Finished")
-
-    return 0
+    if result.wasSuccessful():
+        return 0
+    else:
+        return 1
 
 if __name__ == "__main__":
     try: