ARM-CI: Create mount path if not already present
authorPrajwal A N <an.prajwal@samsung.com>
Fri, 17 Jun 2016 03:24:24 +0000 (12:24 +0900)
committerPrajwal A N <an.prajwal@samsung.com>
Fri, 17 Jun 2016 03:26:47 +0000 (12:26 +0900)
* Previous PRs assumed that the mount path is already created on the CI machine
* This results in errors if the same is not true

Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
netci.groovy

index 81788b2..fe02beb 100755 (executable)
@@ -1736,6 +1736,9 @@ combinedScenarios.each { scenario ->
                                         // Setup variables to hold emulator folder path and the rootfs mount path
                                         def armemul_path = '/opt/linux-arm-emulator'
                                         def armrootfs_mountpath = '/opt/linux-arm-emulator-root'
+                                        // Create the mount path directory if not present already
+                                        buildCommands += "if [ ! -d ${armrootfs_mountpath} ]; then sudo mkdir ${armrootfs_mountpath}; fi;"
+
                                         // Unmount previously mounted rootfs and mount the Linux ARM emulator rootfs at /opt/linux-arm-emulator-root/
                                         buildCommands += "if grep -qs ${armrootfs_mountpath} /proc/mounts; then sudo umount ${armrootfs_mountpath}; fi ; sudo mount ${armemul_path}/platform/rootfs-t30.ext4 ${armrootfs_mountpath}"