Prevent build output contamination while building test overlay
authorSung-Jae Lee <sjlee@mail.com>
Thu, 1 Sep 2016 08:06:30 +0000 (17:06 +0900)
committerSung-Jae Lee <sjlee@mail.com>
Tue, 6 Sep 2016 01:32:49 +0000 (10:32 +0900)
While building test overlay, all files in `$mscorlibDir/bin` are
copyed to `$mscorlibDir` where usually `$coreclrBinDir`.
It contaminates build output. This commit prevent it by moving
copy commend to function `create_core_overlay`.

tests/runtest.sh

index f585992..cd5da94 100755 (executable)
@@ -383,7 +383,10 @@ function create_core_overlay {
     cp -f -v "$coreFxNativeBinDir/Native/"*."$libExtension" "$coreOverlayDir/" 2>/dev/null
 
     cp -f -v "$coreClrBinDir/"* "$coreOverlayDir/" 2>/dev/null
-    cp -f -v "$mscorlibDir/mscorlib.dll" "$coreOverlayDir/"
+    cp -f -v "$mscorlibDir/mscorlib.dll" "$coreOverlayDir/" 2>/dev/null
+    if [ -d "$mscorlibDir/bin" ]; then
+        cp -f -v "$mscorlibDir/bin/"* "$coreOverlayDir/" 2>/dev/null
+    fi
     cp -n -v "$testDependenciesDir"/* "$coreOverlayDir/" 2>/dev/null
     if [ -f "$coreOverlayDir/mscorlib.ni.dll" ]; then
         # Test dependencies come from a Windows build, and mscorlib.ni.dll would be the one from Windows
@@ -1111,9 +1114,6 @@ fi
 if [ -z "$mscorlibDir" ]; then
     mscorlibDir=$coreClrBinDir
 fi
-if [ -d "$mscorlibDir" ] && [ -d "$mscorlibDir/bin" ]; then
-    cp $mscorlibDir/bin/* $mscorlibDir
-fi
 
 if [ ! -z "$longgc" ]; then
     echo "Running Long GC tests"