/[escript]/trunk/scons/grouptest.py
ViewVC logotype

Diff of /trunk/scons/grouptest.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2252 by jfenwick, Wed Feb 4 00:42:46 2009 UTC revision 2253 by jfenwick, Sun Feb 8 23:35:28 2009 UTC
# Line 18  __license__="""Licensed under the Open S Line 18  __license__="""Licensed under the Open S
18  http://www.opensource.org/licenses/osl-3.0.php"""  http://www.opensource.org/licenses/osl-3.0.php"""
19  __url__="http://www.uq.edu.au/esscc/escript-finley"  __url__="http://www.uq.edu.au/esscc/escript-finley"
20    
21  def makeHeader():  
     res="#!/bin/bash\n"  
     res=res+"function failed()\n{\n  echo ""Execution failed for $@""\n  exit 1\n}\n"  
     res=res+"\nexport OLD_PYTHON=$PYTHONPATH\nBINRUNNER=$1\nPYTHONRUNNER=\"$1 $2\"\nBATCH_ROOT=`pwd`\nBUILD_DIR=$BATCH_ROOT/build/posix\n"  
     res=res+"if [ ! -d $BUILD_DIR ]\nthen\n echo Can not find build directory $BUILD_DIR\n exit 2\nfi\n"  
     res=res+"if [ $# -lt 2 ]\nthen\n echo Usage: $0 bin_run_cmd python_run_cmd\n exit 2\nfi\n"  
     return res  
22    
23  class GroupTest:  class GroupTest:
24      def __init__(self, exec_cmd, evars, python_dir, working_dir, test_list):      def __init__(self, exec_cmd, evars, python_dir, working_dir, test_list):
# Line 38  class GroupTest: Line 32  class GroupTest:
32      def makeDir(self,dirname):      def makeDir(self,dirname):
33          self.mkdirs.append(dirname)          self.mkdirs.append(dirname)
34    
35        def makeHeader():
36        res="#!/bin/bash\n"
37        res=res+"function failed()\n{\n  echo ""Execution failed for $@""\n  exit 1\n}\n"
38        res=res+"\nexport OLD_PYTHON=$PYTHONPATH\nBINRUNNER=$1\nPYTHONRUNNER=\"$1 $2\"\nBATCH_ROOT=`pwd`\nBUILD_DIR=$BATCH_ROOT/build/posix\n"
39        res=res+"if [ ! -d $BUILD_DIR ]\nthen\n echo Can not find build directory $BUILD_DIR\n exit 2\nfi\n"
40        res=res+"if [ $# -lt 2 ]\nthen\n echo Usage: $0 bin_run_cmd python_run_cmd\n exit 2\nfi\n"
41        return res
42        makeHeader=staticmethod(makeHeader)
43    
44      def makeString(self):      def makeString(self):
45      res=""      res=""
46      for d in self.mkdirs:      for d in self.mkdirs:
# Line 51  class GroupTest: Line 54  class GroupTest:
54          res=res+"echo Completed "+t+"\n"          res=res+"echo Completed "+t+"\n"
55      res=res+"\n"      res=res+"\n"
56      return res      return res
       
57        

Legend:
Removed from v.2252  
changed lines
  Added in v.2253

  ViewVC Help
Powered by ViewVC 1.1.26