From 622b28520e97d704f9faa96a92142663d6144b61 Mon Sep 17 00:00:00 2001 From: ccremers Date: Fri, 15 Oct 2004 12:11:13 +0000 Subject: [PATCH] - error output is also stored now. --- spdl/gen-tests.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/spdl/gen-tests.py b/spdl/gen-tests.py index 395580e..69dfbb9 100755 --- a/spdl/gen-tests.py +++ b/spdl/gen-tests.py @@ -18,7 +18,7 @@ count = sys.argv[1] lstatus=os.system('./tuples.py ' + count + ' >' + tempfile) # Header -print "#!/usr/bin/sh" +print "#!/bin/sh" print "#" print "# Test list generated by gen-tests.py" print "# at ", time.asctime() @@ -28,8 +28,8 @@ print "#" def getline (inputfile): return string.strip(inputfile.readline()) -def makefileline (tuple): - rt = "results/combined" + count + "-" +def makefilepart (tuple): + rt = count + "-" namelist = string.split (tuple) tocome = len (namelist) for name in namelist: @@ -37,13 +37,23 @@ def makefileline (tuple): tocome = tocome - 1 if tocome > 0: rt = rt + "-" - rt = rt + ".txt" return rt +def makefileline (tuple): + return "results/combined" + makefilepart(tuple) + ".txt" + +def makefileerror (tuple): + return "results/errors" + makefilepart(tuple) + ".txt" + def processline (l): print "./mp.sh ", print l, - print " >", makefileline(l) + # redirect stderr + print " 2>>", makefileerror(l), + # redirect stdout + print " >", makefileline(l), + # new line + print # Process lines inp = open(tempfile, 'r')