Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit cc19cac

Browse files
committed
Remove mscorlib.ni.dll before running tests
The test layout folder that is created when we run tests includes an mscorlib native image. This native image is specific to windows (since we use the windows version of the runtime when building a test layout, even when building a test layout for Linux or OSX) and the runtime will not boot if it is present. When we run tests from CI, we instruct Jenkins to not copy native images, but if you are running tests by hand you need to either make sure you don't copy native images over or remove them before running tests. With more folks wanting to use run-test.sh by hand, we should just make run-test.sh responsible for cleaning up these native images. Fixes #2605
1 parent 4c423dc commit cc19cac

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

run-test.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,17 @@ runtest()
190190

191191
copy_test_overlay $dirName
192192

193+
pushd $dirName > /dev/null
194+
195+
# Remove the mscorlib native image, since our current test layout build process
196+
# uses a windows runtime and so we include the windows native image for mscorlib
197+
if [ -e mscorlib.ni.dll ]
198+
then
199+
rm mscorlib.ni.dll
200+
fi
201+
193202
# Invoke xunit
194203

195-
pushd $dirName > /dev/null
196204
echo
197205
echo "Running tests in $dirName"
198206
echo "./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory"

0 commit comments

Comments
 (0)