correct retcod - was always returning OK because of the tee thing
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sat, 5 Apr 2008 08:27:29 +0000 (08:27 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sat, 5 Apr 2008 08:27:29 +0000 (08:27 +0000)
system/TestMain.py
system/runtest

index 1bf482d..9450c19 100755 (executable)
@@ -235,7 +235,7 @@ steps refer to a method in TestPlc or to a step_* module
                     names.sort()
                     all_step_infos += [ ("%s.%s"%(step,name),module_dict[name],force) for name in names ]
                 except :
-                    print 'Step %s -- ignored'%(step)
+                    print '********** step %s NOT FOUND -- ignored'%(step)
                     traceback.print_exc()
                     overall_result = False
             
index 9fb8e9a..6c46786 100755 (executable)
@@ -2,4 +2,13 @@
 cd $(dirname $0)
 mkdir -p logs
 logfile=logs/runtest-$(date +%H-%M).log
-exec python -u TestMain.py "$@" | tee $logfile
+
+# figure if TestMain succeeds, as the retcod gets lost in the pipe
+rm -f logs/success
+(python -u TestMain.py "$@" && touch logs/success) | tee $logfile
+
+if [ -f logs/success ] ; then
+    exit 0
+else
+    exit 1
+fi