SCons /

Diff from to

 python3incompatibilities = None
 scons = None
 scons_exec = None
-outputfile = None
 qmtest = None
 testlistfile = None
 version = ''
 parser = PassThroughOptionParser(add_help_option=False)
 parser.add_option('-a', '--all', action='store_true',
                       help="Run all tests.")
+parser.add_option('-o', '--output',
+                      help="Save the output from a test run to the log file.")
                       help="Save results to file in SCons XML format.")
 (options, args) = parser.parse_args()
 #print "args:", args
-opts, args = getopt.getopt(args, "3b:def:hj:klno:P:p:qsv:Xx:t",
+opts, args = getopt.getopt(args, "3b:def:hj:klnP:p:qsv:Xx:t",
                             ['baseline=', 'builddir=',
                              'debug', 'external', 'file=', 'help', 'no-progress',
-                             'list', 'no-exec', 'nopipefiles', 'output=',
+                             'list', 'no-exec', 'nopipefiles',
                              'package=', 'passed', 'python=', 'qmtest',
                              'quiet', 'short-progress', 'time',
                              'version=', 'exec=',
         execute_tests = None
     elif o in ['--nopipefiles']:
         allow_pipe_files = False
-    elif o in ['-o', '--output']:
-        if a != '-' and not os.path.isabs(a):
-            a = os.path.join(cwd, a)
-        outputfile = a
     elif o in ['-p', '--package']:
         package = a
     elif o in ['--passed']:
 sys.stdout = Unbuffered(sys.stdout)
 sys.stderr = Unbuffered(sys.stderr)
+if options.output:
+    logfile = open(options.output, 'w')
+    class Tee(object):
+        def __init__(self, openfile, stream):
+            self.file = openfile
+   = stream
+        def write(self, data):
+            self.file.write(data)
+    sys.stdout = Tee(logfile, sys.stdout)
+    sys.stderr = Tee(logfile, sys.stderr)
 # --- define helpers ----
 if sys.platform in ('win32', 'cygwin'):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.