Add an option '--tc-url=<url>' to install.sh 18/177218/3
authorjunghyuk.park <junghyuk.park@samsung.com>
Thu, 26 Apr 2018 07:32:16 +0000 (16:32 +0900)
committerjunghyuk.park <junghyuk.park@samsung.com>
Thu, 26 Apr 2018 07:39:28 +0000 (16:39 +0900)
Download a TC archive file from the specified URL

Change-Id: Ic2d6e771ef904ac027bec77f0f8681de4f6ff125

install.sh

index cb90207..bfe29f1 100755 (executable)
@@ -26,6 +26,7 @@ usage()
     echo "--skiptcdirremove - Do not remove TC directory"
     echo "--uselatesttc - Download a latest unittest file from http://10.113.63.27:8080/"
     echo "                This option is off by default and use a local unittest file under tc directory."
+    echo "--tc-url    - Download a TC archive file from the specified URL"
     exit 1
 }
 
@@ -47,6 +48,7 @@ skiprpminstall=0
 skiptcinstall=0
 uselatesttc=0
 testsurl=""
+tcurl=""
 
 for i in "$@"
 do
@@ -89,6 +91,9 @@ do
         --uselatesttc)
             uselatesttc=1
             ;;
+        --tc-url=*)
+            tcurl=${i#*=}
+            ;;
         *)
             usage
             exit 1
@@ -162,10 +167,7 @@ if [[ $skiprpminstall == 0 ]]; then
 fi
 
 if [ $skiptcinstall == 0 ]; then
-    if [ $uselatesttc == 0 ]; then
-        echo -e "\n\n---- Use tc/testcases.${tcarch}.bin.tgz ----"
-        cp -L tc/testcases.${tcarch}.bin.tgz testcases.bin.tgz
-    else
+    if [ $uselatesttc == 1 ]; then
         echo -e "\n\n---- Download CoreCLR TC ----"
         tc_url="https://ci.dot.net/job/dotnet_coreclr/job/master/job/${tcarch}_release_windows_nt/lastSuccessfulBuild/artifact/bin/tests/tests.zip"
         tc_dir="testcases"
@@ -178,6 +180,12 @@ if [ $skiptcinstall == 0 ]; then
         tar zcf testcases.bin.tgz ./*
         popd
         cp -L ${tc_dir}/testcases.bin.tgz testcases.bin.tgz
+    elif [[ ${tcurl} != "" ]]; then
+        echo -e "\n\n---- Download CoreCLR TC ----"
+        wget $tcurl -O testcases.bin.tgz
+    else
+        echo -e "\n\n---- Use tc/testcases.${tcarch}.bin.tgz ----"
+        cp -L tc/testcases.${tcarch}.bin.tgz testcases.bin.tgz
     fi
 
     echo -e "\n\n---- Install CoreCLR TC ----"