You've already forked linux-packaging-mono
Imported Upstream version 5.4.0.167
Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
parent
e49d6f06c0
commit
536cd135cc
47
external/corert/tests/runtest.sh
vendored
47
external/corert/tests/runtest.sh
vendored
@@ -14,6 +14,7 @@ usage()
|
||||
echo " --- CoreCLR Subset ---"
|
||||
echo " top200 : Runs broad coverage / CI validation (~200 tests)."
|
||||
echo " knowngood : Runs tests known to pass on CoreRT (~6000 tests)."
|
||||
echo " interop : Runs only the interop tests (~43 tests)."
|
||||
echo " all : Runs all tests. There will be many failures (~7000 tests)."
|
||||
exit 1
|
||||
}
|
||||
@@ -80,34 +81,50 @@ run_test_dir()
|
||||
return $?
|
||||
}
|
||||
|
||||
download_and_unzip_tests_artifacts()
|
||||
{
|
||||
url=$1
|
||||
location=$2
|
||||
semaphore=$3
|
||||
if [ ! -e ${semaphore} ]; then
|
||||
if [ -d ${location} ]; then
|
||||
rm -r ${location}
|
||||
fi
|
||||
mkdir -p ${location}
|
||||
|
||||
local_zip=${location}/tests.zip
|
||||
curl --retry 10 --retry-delay 5 -sSL -o ${local_zip} ${url}
|
||||
|
||||
unzip -q ${local_zip} -d ${location}
|
||||
|
||||
echo "CoreCLR tests artifacts restored from ${url}" >> ${semaphore}
|
||||
fi
|
||||
}
|
||||
|
||||
restore_coreclr_tests()
|
||||
{
|
||||
CoreRT_Test_Download_Semaphore=${CoreRT_TestExtRepo}/init-tests.completed
|
||||
CoreRT_NativeArtifact_Download_Semaphore=${CoreRT_TestExtRepo}/init-native-artifact.completed
|
||||
|
||||
if [ -e ${CoreRT_Test_Download_Semaphore} ]; then
|
||||
if [ -e ${CoreRT_Test_Download_Semaphore} ] && [ -e ${CoreRT_NativeArtifact_Download_Semaphore} ]; then
|
||||
echo "Tests are already initialized."
|
||||
return 0
|
||||
fi
|
||||
TESTS_REMOTE_URL=$(<${CoreRT_TestRoot}/CoreCLRTestsURL.txt)
|
||||
NATIVE_REMOTE_URL=$(<${CoreRT_TestRoot}/CoreCLRTestsNativeArtifacts_${CoreRT_BuildOS}.txt)
|
||||
CoreRT_NativeArtifactRepo=${CoreRT_TestExtRepo}/native
|
||||
|
||||
if [ -d ${CoreRT_TestExtRepo} ]; then
|
||||
rm -r ${CoreRT_TestExtRepo}
|
||||
fi
|
||||
mkdir -p ${CoreRT_TestExtRepo}
|
||||
|
||||
echo "Restoring tests (this may take a few minutes).."
|
||||
TESTS_REMOTE_URL=$(<${CoreRT_TestRoot}/../CoreCLRTestsURL.txt)
|
||||
TESTS_LOCAL_ZIP=${CoreRT_TestExtRepo}/tests.zip
|
||||
curl --retry 10 --retry-delay 5 -sSL -o ${TESTS_LOCAL_ZIP} ${TESTS_REMOTE_URL}
|
||||
download_and_unzip_tests_artifacts ${TESTS_REMOTE_URL} ${CoreRT_TestExtRepo} ${CoreRT_Test_Download_Semaphore}
|
||||
|
||||
unzip -q ${TESTS_LOCAL_ZIP} -d ${CoreRT_TestExtRepo}
|
||||
|
||||
echo "CoreCLR tests restored from ${TESTS_REMOTE_URL}" >> ${CoreRT_Test_Download_Semaphore}
|
||||
echo "Restoring native test artifacts..."
|
||||
download_and_unzip_tests_artifacts ${NATIVE_REMOTE_URL} ${CoreRT_NativeArtifactRepo} ${CoreRT_NativeArtifact_Download_Semaphore}
|
||||
}
|
||||
|
||||
run_coreclr_tests()
|
||||
{
|
||||
if [ -z ${CoreRT_TestExtRepo} ]; then
|
||||
CoreRT_TestExtRepo=${CoreRT_TestRoot}/../tests_downloaded/CoreCLR
|
||||
CoreRT_TestExtRepo=$( dirname ${CoreRT_TestRoot} )/tests_downloaded/CoreCLR
|
||||
fi
|
||||
|
||||
restore_coreclr_tests
|
||||
@@ -127,6 +144,8 @@ run_coreclr_tests()
|
||||
CoreRT_TestSelectionArg=
|
||||
if [ "$SelectedTests" = "top200" ]; then
|
||||
CoreRT_TestSelectionArg="--playlist=${CoreRT_TestRoot}/Top200.unix.txt"
|
||||
elif [ "$SelectedTests" = "interop" ]; then
|
||||
CoreRT_TestSelectionArg="--playlist=${CoreRT_TestRoot}/Interop.unix.txt"
|
||||
elif [ "$SelectedTests" = "knowngood" ]; then
|
||||
# Todo: Build the list of tests that pass
|
||||
CoreRT_TestSelectionArg=
|
||||
@@ -206,7 +225,7 @@ while [ "$1" != "" ]; do
|
||||
|
||||
if [ -z ${SelectedTests} ]; then
|
||||
SelectedTests=top200
|
||||
elif [ "${SelectedTests}" != "all" ] && [ "${SelectedTests}" != "top200" ] && [ "${SelectedTests}" != "knowngood" ]; then
|
||||
elif [ "${SelectedTests}" != "all" ] && [ "${SelectedTests}" != "top200" ] && [ "${SelectedTests}" != "knowngood" ] && [ "${SelectedTests}" != "interop" ]; then
|
||||
echo "Error: Invalid CoreCLR test selection."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user