ARM-CI : Fix ARM Emulator vm runs out of space (#6910)
authorSujin Kim <sjsujin.kim@samsung.com>
Thu, 25 Aug 2016 21:01:27 +0000 (06:01 +0900)
committerJan Kotas <jkotas@microsoft.com>
Thu, 25 Aug 2016 21:01:27 +0000 (14:01 -0700)
Now, ARM Emulator failed by out of space on tests (6676)
To resolve, a temp folder in the job's workspace is binded to /tmp. and then 'runtest.sh' would be run by some directories binded from /tmp.

tests/scripts/arm32_ci_script.sh

index 2c20d7f..a8c15e6 100755 (executable)
@@ -180,6 +180,10 @@ function mount_emulator {
     mount_with_checking "-o bind" "/dev/pts" "$__ARMRootfsMountPath/dev/pts"
     mount_with_checking "-t tmpfs" "shm"     "$__ARMRootfsMountPath/run/shm"
     mount_with_checking "-o bind" "/sys"     "$__ARMRootfsMountPath/sys"
+        if [ ! -d "$__ARMRootfsMountPath/bindings/tmp" ]; then
+        sudo mkdir -p "$__ARMRootfsMountPath/bindings/tmp"
+    fi
+    mount_with_checking "-o bind" "/tmp"     "$__ARMRootfsMountPath/bindings/tmp"
 }
 
 #Cross builds coreclr
@@ -265,7 +269,7 @@ function copy_to_emulator {
 #Runs tests in an emulated mode
 function run_tests {
     sudo chroot $__ARMRootfsMountPath /bin/bash -x <<EOF
-        cd /home/coreclr
+        cd "$__ARMEmulCoreclr"
         ./tests/runtest.sh --testRootDir=$__testRootDirBase \
                            --mscorlibDir=$__mscorlibDirBase \
                            --coreFxNativeBinDir=$__coreFxNativeBinDirBase \
@@ -392,10 +396,11 @@ fi
 __buildDirName="$__buildOS.$__buildArch.$__buildConfig"
 
 #Define emulator paths
-__ARMRootfsCoreclrPath="$__ARMRootfsMountPath/home/coreclr"
-__ARMRootfsCorefxPath="$__ARMRootfsMountPath/home/corefx"
-__ARMEmulCoreclr="/home/coreclr"
-__ARMEmulCorefx="/home/corefx"
+__TempFolder="bindings/tmp"
+__ARMRootfsCoreclrPath="$__ARMRootfsMountPath/$__TempFolder/coreclr"
+__ARMRootfsCorefxPath="$__ARMRootfsMountPath/$__TempFolder/corefx"
+__ARMEmulCoreclr="/$__TempFolder/coreclr"
+__ARMEmulCorefx="/$__TempFolder/corefx"
 __testRootDirBase=
 __mscorlibDirBase=
 __coreFxNativeBinDirBase=