summaryrefslogtreecommitdiffstats
path: root/scripts/qemuimage-testlib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/qemuimage-testlib')
-rwxr-xr-xscripts/qemuimage-testlib19
1 files changed, 9 insertions, 10 deletions
diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib
index 051fee806c..622c1ce438 100755
--- a/scripts/qemuimage-testlib
+++ b/scripts/qemuimage-testlib
@@ -14,8 +14,6 @@
14# Version 2. 14# Version 2.
15# 15#
16 16
17TYPE="ext3"
18
19# The folder to hold all scripts running on targets 17# The folder to hold all scripts running on targets
20TOOLS="$COREBASE/scripts/qemuimage-tests/tools" 18TOOLS="$COREBASE/scripts/qemuimage-tests/tools"
21 19
@@ -306,18 +304,18 @@ Test_Find_Image()
306 extension="" 304 extension=""
307 rootfs="" 305 rootfs=""
308 306
309 while getopts "l:k:a:t:" Option 307 while getopts "l:k:a:t:e:" Option
310 do 308 do
311 case $Option in 309 case $Option in
312 l) where="$OPTARG" 310 l) where="$OPTARG"
313 ;; 311 ;;
314 k) kernel="$OPTARG" 312 k) kernel="$OPTARG"
315 extension="bin"
316 ;; 313 ;;
317 a) arch="$OPTARG" 314 a) arch="$OPTARG"
318 ;; 315 ;;
319 t) target="$OPTARG" 316 t) target="$OPTARG"
320 extension="ext3" 317 ;;
318 e) extension="$OPTARG"
321 ;; 319 ;;
322 *) echo "invalid option: -$Option" && return 1 320 *) echo "invalid option: -$Option" && return 1
323 ;; 321 ;;
@@ -396,11 +394,11 @@ Test_Create_Qemu()
396 fi 394 fi
397 395
398 if [ "$QEMUARCH" = "qemux86" -o "$QEMUARCH" = "qemux86-64" ]; then 396 if [ "$QEMUARCH" = "qemux86" -o "$QEMUARCH" = "qemux86-64" ]; then
399 KERNEL=$(Test_Find_Image -l ${DEPLOY_DIR}/images -k bzImage -a ${QEMUARCH}) 397 KERNEL=$(Test_Find_Image -l ${DEPLOY_DIR}/images -k bzImage -a ${QEMUARCH} -e "bin")
400 elif [ "$QEMUARCH" = "qemuarm" -o "$QEMUARCH" = "spitz" -o "$QEMUARCH" = "borzoi" -o "$QEMUARCH" = "akita" -o "$QEMUARCH" = "nokia800" ]; then 398 elif [ "$QEMUARCH" = "qemuarm" -o "$QEMUARCH" = "spitz" -o "$QEMUARCH" = "borzoi" -o "$QEMUARCH" = "akita" -o "$QEMUARCH" = "nokia800" ]; then
401 KERNEL=$(Test_Find_Image -l ${DEPLOY_DIR}/images -k zImage -a ${QEMUARCH}) 399 KERNEL=$(Test_Find_Image -l ${DEPLOY_DIR}/images -k zImage -a ${QEMUARCH})
402 elif [ "$QEMUARCH" = "qemumips" -o "$QEMUARCH" = "qemuppc" ]; then 400 elif [ "$QEMUARCH" = "qemumips" -o "$QEMUARCH" = "qemuppc" ]; then
403 KERNEL=$(Test_Find_Image -l ${DEPLOY_DIR}/images -k vmlinux -a ${QEMUARCH}) 401 KERNEL=$(Test_Find_Image -l ${DEPLOY_DIR}/images -k vmlinux -a ${QEMUARCH} -e "bin")
404 fi 402 fi
405 403
406 # If there is no kernel image found, return failed directly 404 # If there is no kernel image found, return failed directly
@@ -409,7 +407,8 @@ Test_Create_Qemu()
409 return 1 407 return 1
410 fi 408 fi
411 409
412 ROOTFS_IMAGE=$(Test_Find_Image -l ${DEPLOY_DIR}/images -t ${QEMUTARGET} -a ${QEMUARCH}) 410 Test_Info "rootfs image extension selected: $ROOTFS_EXT"
411 ROOTFS_IMAGE=$(Test_Find_Image -l ${DEPLOY_DIR}/images -t ${QEMUTARGET} -a ${QEMUARCH} -e "$ROOTFS_EXT")
413 412
414 # If there is no rootfs image found, return failed directly 413 # If there is no rootfs image found, return failed directly
415 if [ $? -eq 1 ]; then 414 if [ $? -eq 1 ]; then
@@ -417,7 +416,7 @@ Test_Create_Qemu()
417 return 1 416 return 1
418 fi 417 fi
419 418
420 TEST_ROOTFS_IMAGE="${TEST_TMP}/${QEMUTARGET}-${QEMUARCH}-test.ext3" 419 TEST_ROOTFS_IMAGE="${TEST_TMP}/${QEMUTARGET}-${QEMUARCH}-test.${ROOTFS_EXT}"
421 420
422 CP=`which cp` 421 CP=`which cp`
423 422
@@ -751,4 +750,4 @@ Test_Display_Syslog()
751 echo "System logs:" 750 echo "System logs:"
752 cat $tmplog 751 cat $tmplog
753 rm -f $tmplog 752 rm -f $tmplog
754} \ No newline at end of file 753}