Fix some bugs in Linux ILLINK testing.
authorSwaroop Sridhar <swaroops@microsoft.com>
Wed, 29 Mar 2017 01:51:56 +0000 (18:51 -0700)
committerSwaroop Sridhar <Swaroop.Sridhar@microsoft.com>
Wed, 29 Mar 2017 19:48:28 +0000 (12:48 -0700)
Fix a few problems in the <test>.sh generation for
running CoreCLR tests on Linux via ILLINK

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

src/coreclr/tests/src/CLRTest.Execute.Bash.targets

index 4f5cee8..62cda21 100644 (file)
@@ -235,20 +235,23 @@ then
   if [  $ERRORLEVEL -ne 0 ]
   then
     echo ILLINK FAILED $ERRORLEVEL
-    if [ -z "$KeepLinkedBinaries" ]; 
+    if [ -z "$KeepLinkedBinaries" ]; 
     then
       rm -rf $LinkBin
     fi
     exit 1
   fi
   
-  # Copy CORECLR native binaries to $LinkBin, so that we can run the test based on that directory
-  cp $CORE_ROOT/clrjit.dll $LinkBin
-  cp $CORE_ROOT/coreclr.dll $LinkBin 
-  cp $CORE_ROOT/mscorrc.dll $LinkBin
-  cp $CORE_ROOT/CoreRun.exe $LinkBin
+  # Copy CORECLR native binaries to $LinkBin, 
+  # so that we can run the test based on that directory
+  cp $CORE_ROOT/*.so $LinkBin/
+  cp $CORE_ROOT/corerun $LinkBin/
+
   # Copy some files that may be arguments
-  cp *.txt $LinkBin
+  for f in *.txt;
+  do
+    [ -e "$f" ] && cp $f $LinkBin
+  done
 
   ExePath=$LinkBin/$(InputAssemblyName)
   export CORE_ROOT=$PWD/$LinkBin
@@ -262,7 +265,7 @@ fi
 
 if [ ! -z "$DoLink" ]; 
 then
-  if [ -z "$KeepLinkedBinaries" ]; 
+  if [ -z "$KeepLinkedBinaries" ]; 
   then
     rm -rf $LinkBin
   fi