Imported Upstream version 5.4.0.167

Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-08-21 15:34:15 +00:00
parent e49d6f06c0
commit 536cd135cc
12856 changed files with 563812 additions and 223249 deletions

View File

@@ -28,13 +28,34 @@ fi
# Remove the test executable from the arg list so it isn't passed to test execution
shift
testExtRepo=$( dirname ${CoreRT_TestRoot} )/tests_downloaded/CoreCLR/
nativeArtifactRepo=${testExtRepo}native/
dirSuffix=$(dirname ${PWD#$testExtRepo})/
nativeDir=${nativeArtifactRepo}tests/src/${dirSuffix}
# In OSX we copy the native component to the directory where the exectuable resides.
# However, in Linux dlopen doesn't seem to look for current directory to resolve the dynamic library.
# So instead we point LD_LIBRARY_PATH to the directory where the native component is.
if [ -e ${nativeDir} ]; then
if [ "${CoreRT_BuildOS}" == "OSX" ]; then
echo "Copying native component from :"${nativeDir}
cp ${nativeDir}*.dylib native/ 2>/dev/null
fi
if [ "${CoreRT_BuildOS}" == "Linux" ]; then
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${nativeDir}
export LD_LIBRARY_PATH
fi
fi
if [[ ! -f native/${TestFileName} ]]; then
echo "ERROR: Native binary not found. Unable to run test."
exit -1
fi
native/${TestFileName} "$@"
pushd native/
./${TestFileName} "$@"
testScriptExitCode=$?
popd
if [[ $CoreRT_EnableCoreDumps == 1 ]]; then
# Handle any core files generated when running the test.