/[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 2257 by jfenwick, Sun Feb 8 23:35:28 2009 UTC revision 2258 by jfenwick, Tue Feb 10 00:27:44 2009 UTC
# Line 34  class GroupTest: Line 34  class GroupTest:
34    
35      def makeHeader():      def makeHeader():
36      res="#!/bin/bash\n"      res="#!/bin/bash\n"
37        res=res+"\n#############################################\n"
38        res=res+"# This file is autogenerated by scons.\n"
39        res=res+"# It will be regenerated each time scons is run\n"
40        res=res+"#############################################\n\n"
41      res=res+"function failed()\n{\n  echo ""Execution failed for $@""\n  exit 1\n}\n"      res=res+"function failed()\n{\n  echo ""Execution failed for $@""\n  exit 1\n}\n"
42      res=res+"\nexport OLD_PYTHON=$PYTHONPATH\nBINRUNNER=$1\nPYTHONRUNNER=\"$1 $2\"\nBATCH_ROOT=`pwd`\nBUILD_DIR=$BATCH_ROOT/build/posix\n"      res=res+"\nexport OLD_PYTHON=$PYTHONPATH\nBINRUNNER=$1\nPYTHONRUNNER=\"$1 $2\"\nBATCH_ROOT=`pwd`\nBUILD_DIR=$BATCH_ROOT/build/posix\n"
43      res=res+"if [ ! -d $BUILD_DIR ]\nthen\n echo Can not find build directory $BUILD_DIR\n exit 2\nfi\n"      res=res+"if [ ! -d $BUILD_DIR ]\nthen\n echo Can not find build directory $BUILD_DIR\n exit 2\nfi\n"
# Line 44  class GroupTest: Line 48  class GroupTest:
48      def makeString(self):      def makeString(self):
49      res=""      res=""
50      for d in self.mkdirs:      for d in self.mkdirs:
51          res="if [ ! -d "+str(d)+" ]\nthen\n  mkdir "+d+"\nfi"          res=res+"if [ ! -d "+str(d)+" ]\nthen\n  mkdir "+d+"\nfi\n"
52      for v in self.evars:      for v in self.evars:
53          res=res+"\nexport "+str(v[0])+"="+str(v[1])          res=res+"\nexport "+str(v[0])+"="+str(v[1])
54      res=res+"\nexport PYTHONPATH="+self.python_dir+":$OLD_PYTHON"+"\n"+"cd "+self.working_dir+"\n"      res=res+"\nexport PYTHONPATH="+self.python_dir+":$OLD_PYTHON"+"\n"+"cd "+self.working_dir+"\n"

Legend:
Removed from v.2257  
changed lines
  Added in v.2258

  ViewVC Help
Powered by ViewVC 1.1.26