In autoserv, be more lenient when deciding if results exist.  The problem was 
that we were running parsing/archiving on repair failed results, but those 
don't include a control.srv (we simply run autoserv -R).

Signed-off-by: Steve Howard <[email protected]>

--- autotest/server/autoserv    2010-01-11 15:32:37.000000000 -0800
+++ autotest/server/autoserv    2010-01-11 15:32:37.000000000 -0800
@@ -175,7 +175,10 @@
         if not results:
             results = 'results.' + time.strftime('%Y-%m-%d-%H.%M.%S')
         results  = os.path.abspath(results)
-        resultdir_exists = os.path.exists(os.path.join(results, 'control.srv'))
+        resultdir_exists = False
+        for filename in ('control.srv', 'status.log', '.autoserv_execute'):
+            if os.path.exists(os.path.join(results, filename)):
+                resultdir_exists = True
         if not parser.options.use_existing_results and resultdir_exists:
             error = "Error: results directory already exists: %s\n" % results
             sys.stderr.write(error)
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to