Browse Source

Fixes from discussion in comments

msmith-techempower 10 years ago
parent
commit
2f5b172619
2 changed files with 6 additions and 11 deletions
  1. 6 3
      toolset/benchmark/framework_test.py
  2. 0 8
      toolset/setup/linux/bash_functions.sh

+ 6 - 3
toolset/benchmark/framework_test.py

@@ -167,7 +167,7 @@ class FrameworkTest:
 
 
     # Setup environment variables    
     # Setup environment variables    
     logDir = os.path.join(self.fwroot, self.benchmarker.latest_results_directory, 'logs', self.name.lower())
     logDir = os.path.join(self.fwroot, self.benchmarker.latest_results_directory, 'logs', self.name.lower())
-    bash_functions_path= os.path.join(self.fwroot 'toolset/setup/linux/bash_functions.sh')
+    bash_functions_path= os.path.join(self.fwroot, 'toolset/setup/linux/bash_functions.sh')
     setup_util.replace_environ(config='$FWROOT/config/benchmark_profile', 
     setup_util.replace_environ(config='$FWROOT/config/benchmark_profile', 
               command='''\
               command='''\
               export TROOT=%s       && \
               export TROOT=%s       && \
@@ -177,7 +177,7 @@ class FrameworkTest:
               export MAX_THREADS=%s    \
               export MAX_THREADS=%s    \
               ''' % (
               ''' % (
                 self.directory, 
                 self.directory, 
-                self.iroot, 
+                self.install_root, 
                 self.database_host, 
                 self.database_host, 
                 logDir,
                 logDir,
                 self.benchmarker.threads))
                 self.benchmarker.threads))
@@ -212,7 +212,10 @@ class FrameworkTest:
     # See http://www.pixelbeat.org/programming/stdio_buffering/
     # See http://www.pixelbeat.org/programming/stdio_buffering/
     # See https://blogs.gnome.org/markmc/2013/06/04/async-io-and-python/
     # See https://blogs.gnome.org/markmc/2013/06/04/async-io-and-python/
     # See http://eyalarubas.com/python-subproc-nonblock.html
     # See http://eyalarubas.com/python-subproc-nonblock.html
-    command = 'cat %s %s.sh > /tmp/command.sh && sudo -u %s -E -H stdbuf -o0 -e0 bash -ex /tmp/command.sh' % (bash_functions_path, os.path.join(self.troot, self.setup_file), self.benchmarker.runner_user)
+    command = 'cat %s %s.sh > /tmp/command.sh && sudo -u %s -E -H stdbuf -o0 -e0 bash -ex /tmp/command.sh' % (
+      bash_functions_path, 
+      os.path.join(self.troot, self.setup_file), 
+      self.benchmarker.runner_user)
     
     
     debug_command = '''\
     debug_command = '''\
       export FWROOT=%s      && \\
       export FWROOT=%s      && \\

+ 0 - 8
toolset/setup/linux/bash_functions.sh

@@ -20,8 +20,6 @@ fw_get () {
   # Ensure the background job is killed if we are
   # Ensure the background job is killed if we are
   kill $!; trap 'kill $!' SIGTERM
   kill $!; trap 'kill $!' SIGTERM
 }
 }
-# Makes it available in subshells
-export -f fw_get
 
 
 fw_untar() {
 fw_untar() {
   echo "Running 'tar xf $@'...please wait"
   echo "Running 'tar xf $@'...please wait"
@@ -31,7 +29,6 @@ fw_untar() {
   # use -f to avoid printing errors if they gave additional arguments
   # use -f to avoid printing errors if they gave additional arguments
   rm -f "$@"
   rm -f "$@"
 }
 }
-export -f fw_untar
 
 
 fw_unzip() {
 fw_unzip() {
   echo "Running 'unzip $@'...please wait"
   echo "Running 'unzip $@'...please wait"
@@ -40,7 +37,6 @@ fw_unzip() {
   # use -f to avoid printing errors if they gave additional arguments
   # use -f to avoid printing errors if they gave additional arguments
   rm -f "$@"
   rm -f "$@"
 }
 }
-export -f fw_unzip
 
 
 # Download *.deb file and install into IROOT without using sudo
 # Download *.deb file and install into IROOT without using sudo
 # Does not download dependant packages
 # Does not download dependant packages
@@ -53,7 +49,6 @@ fw_apt_to_iroot() {
   echo "Extracting $1 to $DIR"
   echo "Extracting $1 to $DIR"
   dpkg-deb -x $1*.deb "$IROOT/$DIR" && rm $1*.deb
   dpkg-deb -x $1*.deb "$IROOT/$DIR" && rm $1*.deb
 }
 }
-export -f 
 
 
 # Was there an error for the current dependency?
 # Was there an error for the current dependency?
 FW_dep_error=0
 FW_dep_error=0
@@ -78,7 +73,6 @@ fw_traperror () {
   #echo "  Bash source stack : ${bashstack[@]}"
   #echo "  Bash source stack : ${bashstack[@]}"
   #echo "  Bash line stack   : ${linestack[@]}"
   #echo "  Bash line stack   : ${linestack[@]}"
 }
 }
-export -f fw_traperror
 
 
 # Requires dependencies to come in order e.g. Nimrod before
 # Requires dependencies to come in order e.g. Nimrod before
 # Jester, etc. Users should be know this 
 # Jester, etc. Users should be know this 
@@ -153,7 +147,6 @@ fw_depends() {
 
 
   return $FW_any_errors
   return $FW_any_errors
 }
 }
-export -f fw_depends
 
 
 # Echo's 0 if file or directory exists
 # Echo's 0 if file or directory exists
 # To be used with or || blocks, avoids triggering our ERR 
 # To be used with or || blocks, avoids triggering our ERR 
@@ -165,4 +158,3 @@ fw_exists() {
     echo 1
     echo 1
   fi 
   fi 
 }
 }
-export -f fw_exists