Add tc-file and tests-file options to install.sh 42/179342/1
authorjunghyuk.park <junghyuk.park@samsung.com>
Thu, 17 May 2018 07:29:33 +0000 (16:29 +0900)
committerjunghyuk.park <junghyuk.park@samsung.com>
Thu, 17 May 2018 07:29:33 +0000 (16:29 +0900)
Change-Id: I4fd4eb646821d7a097bbdace251ba9f68e943dce

install.sh

index 610d6d3..1a45749 100755 (executable)
@@ -23,12 +23,14 @@ usage()
     echo "                Default is '/opt/usr/coreclr-tc'."
     echo "--tests-url   - The url of files in 'tests' directory to perform unittest."
     echo "                Default is to get those files from tizen branch"
+    echo "--tests-file  - Specify the file containing files in 'tests' directory to perform unittest."
     echo "--skiprpminstall  - Do not install rpm files"
     echo "--skiptcinstall   - Do not install TC archive"
     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"
+    echo "--tc-file   - Specify the TC archive file"
     exit 1
 }
 
@@ -50,7 +52,9 @@ skiprpminstall=0
 skiptcinstall=0
 uselatesttc=0
 testsurl=""
+testsfile=""
 tcurl=""
+tcfile=""
 httpuser=""
 httppassword=""
 
@@ -83,6 +87,9 @@ do
         --tests-url=*)
             testsurl=${i#*=}
             ;;
+        --tests-file=*)
+            testsfile=${i#*=}
+            ;;
         --skiprpminstall)
             skiprpminstall=1
             ;;
@@ -98,6 +105,9 @@ do
         --tc-url=*)
             tcurl=${i#*=}
             ;;
+        --tc-file=*)
+            tcfile=${i#*=}
+            ;;
         --url-user=*)
             urluser=${i#*=}
             ;;
@@ -210,6 +220,9 @@ if [ $skiptcinstall == 0 ]; then
     elif [[ ${tcurl} != "" ]]; then
         echo -e "\n\n---- Download CoreCLR TC ----"
         wget $tcurl -O testcases.bin.tgz
+    elif [[ ${tcfile} != "" ]]; then
+        echo -e "\n\n---- Use ${tcfile} ----"
+        cp -L ${tcfile} testcases.bin.tgz
     else
         echo -e "\n\n---- Use tc/testcases.${tcarch}.bin.tgz ----"
         cp -L tc/testcases.${tcarch}.bin.tgz testcases.bin.tgz
@@ -229,6 +242,9 @@ if [[ ${testsurl} != "" ]]; then
     testsfile=${testsurl##*/}
     tar zxf ${testsfile}
     rm -rf ${testsfile}
+elif [[ ${testsfile} != "" ]]; then
+    echo -e "\n\n---- Unpack tests files from ${testsfile} ----"
+    tar zxf ${testsfile}
 else
     echo -e "\n\n---- Checkout runtest.sh from master branch ----"
     git checkout tizen -- ./tests/runtest.sh