blob: f184ebaf413034005860dc8e9b43a0786262d821 [file] [log] [blame]
mbligh570e93e2006-11-26 05:15:56 +00001#!/usr/bin/python
2import sys, os, time
3from subprocess import *
4
5# We want to set the output (stdout&stderr) of the autotest binary onto our
6# stdout channel. We went to get the status stream of autotest back on our
7# stderr channel - we set up fd 3 for this, and harness_simple.py can
8# open it later.
9
10# Set up file descriptor 3 as a copy of our stderr. This is the status channel
11os.dup2(2,3)
12# Join our stderr in with our stdout
13os.dup2(1,2)
14
15autodir = os.path.dirname(sys.argv[0])
16autotest = os.path.join(autodir, 'autotest')
17cmd = ' '.join([autotest, '-H simple'] + sys.argv[1:])
18p = Popen(cmd, shell=True, stderr=STDOUT, close_fds=False)
19os.waitpid(p.pid, 0)