add tests-url option 06/153406/1
authorjiseob.jang <jiseob.jang@samsung.com>
Thu, 28 Sep 2017 09:15:29 +0000 (18:15 +0900)
committerjiseob.jang <jiseob.jang@samsung.com>
Thu, 28 Sep 2017 09:15:29 +0000 (18:15 +0900)
Change-Id: Id13e5fe27faa48cacfc909f3eeeecb128ec4e036
Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
install.sh

index c32cd62..cb38d1b 100755 (executable)
@@ -19,6 +19,8 @@ usage()
     echo "--prefix-dir  - You can specify the prefix directory for performing the unittest"
     echo "                like /opt/usr/coreclr-tc"
     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 "--skiprpminstall  - Do not install rpm files"
     echo "--skiptcinstall   - Do not install TC archive"
     echo "--skiptcdirremove - Do not remove TC directory"
@@ -44,6 +46,7 @@ clrdir=""
 skiprpminstall=0
 skiptcinstall=0
 uselatesttc=0
+testsurl=""
 
 for i in "$@"
 do
@@ -71,6 +74,9 @@ do
         --prefix-dir=*)
             clrdir=${i#*=}
             ;;
+        --tests-url=*)
+            testsurl=${i#*=}
+            ;;
         --skiprpminstall)
             skiprpminstall=1
             ;;
@@ -173,13 +179,26 @@ if [ $skiptcinstall == 0 ]; then
     rm testcases.bin.tgz
 fi
 
-echo -e "\n\n---- Checkout runtest.sh from master branch ----"
-git checkout tizen -- ./tests/runtest.sh
-git checkout tizen -- ./tests/tests*.txt
+if [ ${testsurl} != "" ]; then
+    echo -e "\n\n---- wget tests files from tests-url ----"
+    wget ${testsurl}
+    testsfile=${testsurl##*/}
+    tar zxf ${testsfile}
+    rm -rf ${testsfile}
+else
+    echo -e "\n\n---- Checkout runtest.sh from master branch ----"
+    git checkout tizen -- ./tests/runtest.sh
+    git checkout tizen -- ./tests/tests*.txt
+    git checkout tizen -- ./tests/skipCrossGenFiles.*.txt
+    git checkout tizen -- ./tests/setup-stress-dependencies.sh
+fi
+#sed -i "s/((maxProcesses = \$NumProc.*/((maxProcesses = 1))/g" tests/runtest.sh
+sed -i "s/NumProc=\$(nproc.*/NumProc=1/g" tests/runtest.sh
 git apply Add-skipped-testcase-on-TM1.diff
-git checkout tizen -- ./tests/skipCrossGenFiles.*.txt
-git checkout tizen -- ./tests/setup-runtime-dependencies.sh
-sdb ${opt} push ./tests/* $clrdir
+sdb ${opt} push ./tests/runtest.sh $clrdir
+sdb ${opt} push ./tests/tests*.txt $clrdir
+sdb ${opt} push ./tests/skipCrossGenFiles.*.txt $clrdir
+sdb ${opt} push ./tests/setup-stress-dependencies.sh $clrdir
 rm -rf ./tests
 git reset -- tests/*