blob: 79ccd1b3c5c6164154e0b606207f12824a6f9143 [file] [log] [blame]
mbligh570e93e2006-11-26 05:15:56 +00001#!/usr/bin/python
mbligh0c3548d2008-02-01 18:08:53 +00002from common.check_version import check_python_version
mblighfbfb77d2007-02-15 18:54:03 +00003check_python_version()
4
mbligh570e93e2006-11-26 05:15:56 +00005import sys, os, time
6from subprocess import *
7
8# We want to set the output (stdout&stderr) of the autotest binary onto our
9# stdout channel. We went to get the status stream of autotest back on our
10# stderr channel - we set up fd 3 for this, and harness_simple.py can
11# open it later.
12
13# Set up file descriptor 3 as a copy of our stderr. This is the status channel
14os.dup2(2,3)
15# Join our stderr in with our stdout
16os.dup2(1,2)
17
18autodir = os.path.dirname(sys.argv[0])
19autotest = os.path.join(autodir, 'autotest')
20cmd = ' '.join([autotest, '-H simple'] + sys.argv[1:])
mblighfaf0cd42007-11-19 16:00:24 +000021exit_code = call(cmd, shell=True, stderr=STDOUT, close_fds=False)
22sys.exit(exit_code) # pass on the exit status from autotest