diff options
author | Stefan Stanacar <stefanx.stanacar@intel.com> | 2013-05-10 19:06:26 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-12 08:33:16 +0100 |
commit | cef2446eb34c878ed9b5087d53c334cb407a2190 (patch) | |
tree | a377717e7945b40780c6333fa0f92fca1da42ceb /scripts | |
parent | 2c2dd5be3ea38e8639ed3ffb65dd9ad638c08a59 (diff) | |
download | poky-cef2446eb34c878ed9b5087d53c334cb407a2190.tar.gz |
imagetest-qemu.bbclass, qemuimage-testlib: add support for more FSTYPES
qemuimage-testlib hardcodes ext3 as fs type. This adds support for more
images types which are supported by runqemu: ext[234]/jffs2/btrfs.
I've skipped (for now) vmdk (which qemu can boot) because:
- we don't have network on images without connman because of the way
runqemu starts vmdk images (can't pass kernel args for network config)
- qemuimage-testlib-pythonhelper relies on '192.168' being in the output of
ps to return the pid
(From OE-Core rev: 95b7cafafcaa4dda7328632475003f5778ab95bd)
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/qemuimage-testlib | 19 |
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 | ||
17 | TYPE="ext3" | ||
18 | |||
19 | # The folder to hold all scripts running on targets | 17 | # The folder to hold all scripts running on targets |
20 | TOOLS="$COREBASE/scripts/qemuimage-tests/tools" | 18 | TOOLS="$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 | } |