diff options
author | Sejong Oh <sejooh@microsoft.com> | 2016-05-04 14:06:16 -0700 |
---|---|---|
committer | Sejong Oh <sejooh@microsoft.com> | 2016-05-16 18:00:29 -0700 |
commit | 3fa109c73de2b56059f8b7204503efab40d66d86 (patch) | |
tree | d9b511eb1cae2a80f9822e797cc3ff2488b5ec0b /tests | |
parent | af1961073ba02f76c58a86f5528066e5813c2bb1 (diff) | |
download | coreclr-3fa109c73de2b56059f8b7204503efab40d66d86.tar.gz coreclr-3fa109c73de2b56059f8b7204503efab40d66d86.tar.bz2 coreclr-3fa109c73de2b56059f8b7204503efab40d66d86.zip |
Always download coredistools package
runtest.sh/cmd currently downloads the coredistools package if COMPlus_GCStress variable is set by TestEnv or test-env options. This is a bit complicated and this doesn't work with a new option for GC stress testing in build/buildtest.cmd. This changeset moves downloading the coredistools package to buildtest.cmd where it takes gcstress option and downloads other packages.
Linux build doesn't have buildtest.sh, so package donwloading is still in
runtest.sh
Diffstat (limited to 'tests')
-rw-r--r-- | tests/buildtest.cmd | 6 | ||||
-rw-r--r-- | tests/runtest.cmd | 12 | ||||
-rwxr-xr-x | tests/runtest.sh | 30 | ||||
-rwxr-xr-x | tests/setup-runtime-dependencies.cmd | 4 |
4 files changed, 11 insertions, 41 deletions
diff --git a/tests/buildtest.cmd b/tests/buildtest.cmd index 5c0d688800..08951a2a69 100644 --- a/tests/buildtest.cmd +++ b/tests/buildtest.cmd @@ -182,6 +182,12 @@ REM === REM ========================================================================================= call %__ProjectDir%\init-tools.cmd +REM ========================================================================================= +REM === +REM === Resolve runtime dependences +REM === +REM ========================================================================================= +call tests\setup-runtime-dependencies.cmd /arch %__BuildArch% /outputdir %__BinDir% REM ========================================================================================= REM === diff --git a/tests/runtest.cmd b/tests/runtest.cmd index d894c8e080..e5f6262ec8 100644 --- a/tests/runtest.cmd +++ b/tests/runtest.cmd @@ -300,18 +300,6 @@ if "%CORE_ROOT%" == "" ( echo %__MsgPrefix%Error: Ensure you have done a successful build of the Product and Run - runtest BuildArch BuildType {path to product binaries}. exit /b 1 ) -:: Pull down dependent packages needed for testing -setlocal -if defined __TestEnv call %__TestEnv% -if defined COMPlus_GCStress set __Result=true -endlocal & set __IsGCTest=%__Result% -if "%__IsGCTest%"=="true" ( - call tests\setup-runtime-dependencies.cmd /arch %__BuildArch% /outputdir %CORE_ROOT% - if errorlevel 1 ( - echo Failed to donwload runtime packages - exit /b 1 - ) -) :: Long GC tests take about 10 minutes per test on average, so :: they often bump up against the default 10 minute timeout. diff --git a/tests/runtest.sh b/tests/runtest.sh index 9550c7f625..ab4c50d40b 100755 --- a/tests/runtest.sh +++ b/tests/runtest.sh @@ -866,36 +866,8 @@ else load_failing_tests fi - - scriptPath=$(dirname $0) - -# Check if environment variables are provided -if [ ! -z "$testEnv" ]; then - # Check if this is GC stress testing - GCStressLevel=`(source $testEnv; echo $COMPlus_GCStress)` - # Set __TestEnv that will be executed just before running tests - absTestEnvPath=`readlink -f ${testEnv}` - export __TestEnv='source '${absTestEnvPath} -fi - -# Still support setting COMPlus_GCStress before runtest.sh but recommend -# using --test-env option. -if [ -z "$GCStressLevel" ]; then - if [ -n "$COMPlus_GCStress" ]; then - GCStressLevel=`echo $COMPlus_GCStress` - fi -fi - -# Download runtime dependent libraries -if [ ! -z "$GCStressLevel" ]; then - ${scriptPath}/setup-runtime-dependencies.sh --outputDir=$coreOverlayDir - if [ $? -ne 0 ] - then - echo 'Failed to download coredistools library' - exit $EXIT_CODE_EXCEPTION - fi -fi +${scriptPath}/setup-runtime-dependencies.sh --outputDir=$coreOverlayDir cd "$testRootDir" if [ -z "$testDirectories" ] diff --git a/tests/setup-runtime-dependencies.cmd b/tests/setup-runtime-dependencies.cmd index 091339982b..5b13d09f82 100755 --- a/tests/setup-runtime-dependencies.cmd +++ b/tests/setup-runtime-dependencies.cmd @@ -105,6 +105,10 @@ if not exist "%__LibPath%" ( REM Copy library to output directory echo Copy library: %__LibPath% to %__OutputDir% copy /y "%__LibPath%" "%__OutputDir%" +if errorlevel 1 ( + echo Failed to copy %__LibPath% to %__OutputDir% + goto Fail +) REM Delete temporary files if exist "%__TmpDir%" ( |