Change autotest_client to only use -H simple if you don't specify
any other -H args. Otherwise when autoserv calls this you end up
with "-H simple -H autoserv", which technically works, but isn't
really the right thing to do.
Risk: Low
Visibility: No more duplicate -H args on the autotest commandline.
Signed-off-by: John Admanski <jadmanski@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@2564 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/autotest_client b/client/bin/autotest_client
index 1e275a4..b1a14ab 100755
--- a/client/bin/autotest_client
+++ b/client/bin/autotest_client
@@ -21,7 +21,11 @@
autodir = os.path.dirname(sys.argv[0])
autotest = os.path.join(autodir, 'autotest')
-cmd = ' '.join([autotest, '-H simple'] + sys.argv[1:])
+
+args = [autotest] + sys.argv[1:]
+if '-H' not in args:
+ args.insert(1, '-H simple')
+cmd = ' '.join(args)
exit_code = subprocess.call(cmd, shell=True, stderr=subprocess.STDOUT,
close_fds=False)
sys.exit(exit_code) # pass on the exit status from autotest