add crossgen option in run.sh 32/151932/2
authorjiseob.jang <jiseob.jang@samsung.com>
Fri, 22 Sep 2017 10:05:18 +0000 (19:05 +0900)
committerjiseob.jang <jiseob.jang@samsung.com>
Mon, 25 Sep 2017 02:50:53 +0000 (11:50 +0900)
Change-Id: Icc9458eff30a76369359e301de2ce6f698a522e0
Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
run.sh
script/create_ni_files.sh

diff --git a/run.sh b/run.sh
index 56ecd9c..024961d 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -10,14 +10,19 @@ usage()
     echo "--environment  - You can specify the environment variable for performing the unittest"
     echo "--options      - You can specify options for performing the unittest"
     echo "--pending-timeout - You can specify hours for killing pending unittest"
+    echo "--crossgen-options - You can specify options for creating ni files"
+    echo "--crossgen-for     - You can specify which to create ni for. If you leave this blank or skip, system is default value for this. You can set it to system or fxutc or full"
     exit 1
 }
 
 opt=""
+serial_num=""
 clrdir=""
 environment=""
 options=""
 timeout=""
+crossgen_options=""
+crossgen_for="system"
 
 for i in "$@"
 do
@@ -31,6 +36,7 @@ do
         exit 1
         ;;
     --device=*)
+        serial_num=${i#*=}
         opt="-s "${i#*=}
         ;;
     --prefix-dir=*)
@@ -45,6 +51,12 @@ do
     --pending-timeout=*)
         timeout=${i#*=}
         ;;
+    --crossgen-options=*)
+        crossgen_options=${i#*=}
+        ;;
+    --crossgen-for=*)
+        crossgen_for=${i#*=}
+        ;;
 
     *)
         usage
@@ -80,6 +92,17 @@ overlaydir="$tcdir/Tests/coreoverlay"
 today=$( date +"%Y-%m-%d %H:%M:%S" )
 sdb ${opt} shell date -s "$today"
 
+if [[ ${crossgen_options} != "" ]]; then
+      echo "================================================"
+      echo "                Start Crossgen                  "
+      echo " environment : ${environment}"
+      echo " crossgen option : ${crossgen_options}"
+      echo "================================================"
+      echo ""
+       ./script/create_ni_files.sh --device=${serial_num} --overlay-dir=${overlaydir} --environment=${environment} \
+       --crossgen-options=${crossgen_options} --crossgen-for=${crossgen_for}
+fi
+
 echo "sdb ${opt} shell \"cd $clrdir && \
 $environment \
 ./runtest.sh --testRootDir=$tcdir \
index ce11eab..e0d5dd7 100755 (executable)
@@ -8,8 +8,8 @@ usage()
     echo "--device               - If there are more than one target,"
     echo "                         you should pass the device name by using 'sdb devices' command"
     echo "--overlay-dir          - You can specify the path of overlay"
-    echo "--ni-for               - You can specify which to create ni for. If you leave this blank or skip, system is default value for this. You can set it to system or clrutc or full"
-    echo "--utc-dir              - You can specify where to create ni from. If --ni-for is set to [clrutc or full], the default value is '/opt/usr/coreclr-tc/Windows_NT.${tcarch}.Release'"
+    echo "--crossgen-for               - You can specify which to create ni for. If you leave this blank or skip, system is default value for this. You can set it to system or clrutc or full"
+    echo "--utc-dir              - You can specify where to create ni from. If --crossgen-for is set to [clrutc or full], the default value is '/opt/usr/coreclr-tc/Windows_NT.${tcarch}.Release'"
     echo "--environment          - You can specify the environment variable for performing the unittest"
     echo "--crossgen-options     - You can specify options for creating ni files"
     echo ""
@@ -45,7 +45,7 @@ do
     --overlay-dir=*)
         overlaydir=${i#*=}
         ;;
-    --ni-for=*)
+    --crossgen-for=*)
         nifor=${i#*=}
         ;;
     --utc-dir=*)
@@ -91,7 +91,7 @@ if [[ ${overlaydir} == "" ]]; then
 fi
 
 if [ "$nifor" != "system" ] && [ "$nifor" != "clrutc" ] && [ "$nifor" != "full" ]; then
-    echo "'--ni-for' should be one of 'system' or 'clrutc' or 'full'"
+    echo "'--crossgen-for' should be one of 'system' or 'clrutc' or 'full'"
     exit 1
 fi
 
@@ -153,4 +153,4 @@ if [ "$nifor" == "system" ] || [ "$nifor" == "full" ]; then
         mkdir -p overlay && cp ${overlaydir}/* overlay \
         && tar zcvf overlay_with_ni.tgz overlay \
         && rm -rf overlay"
-fi
\ No newline at end of file
+fi