Fix environment settings for Unix JIT stress scenarios
authorRuss Keldorph <Russ.Keldorph@microsoft.com>
Fri, 27 May 2016 17:43:35 +0000 (10:43 -0700)
committerRuss Keldorph <Russ.Keldorph@microsoft.com>
Fri, 27 May 2016 20:13:46 +0000 (13:13 -0700)
The environment settings necessary to run tests in these modes were being
dropped.  They need to be tunneled through properly in a couple of places.

Fixes dotnet/coreclr#5278

Commit migrated from https://github.com/dotnet/coreclr/commit/c0d6ce3b32f591b91d57a409b3640cc3d760d520

src/coreclr/netci.groovy
src/coreclr/tests/runtest.sh

index 5bdeb28..f38ca55 100755 (executable)
@@ -181,15 +181,15 @@ def static genStressModeScriptStep(def os, def stressModeName, def stressModeVar
         }
     }
     else {
-        // For these we don't use a script, we use directly
         stepScript += "echo Setting variables for ${stressModeName}\n"
-        stepScript += "rm -f ${stepScriptLocation}\n"
+        stepScript += "echo \\#\\!/usr/bin/env bash > ${stepScriptLocation}\n"
         stressModeVars.each{ k, v -> 
             // Write out what we are writing to the script file
             stepScript += "echo Setting ${k}=${v}\n"
             // Write out the set itself to the script file`
             stepScript += "echo export ${k}=${v} >> ${stepScriptLocation}\n"
         }
+        stepScript += "chmod +x ${stepScriptLocation}\n"
     }
     return stepScript
 }
index 2a70c1b..945088d 100755 (executable)
@@ -918,6 +918,8 @@ fi
 scriptPath=$(dirname $0)
 ${scriptPath}/setup-runtime-dependencies.sh --outputDir=$coreOverlayDir
 
+export __TestEnv=$testEnv
+
 cd "$testRootDir"
 time_start=$(date +"%s")
 if [ -z "$testDirectories" ]