aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2018-05-23 20:09:49 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2018-05-23 20:09:49 +0000
commit9158c48b8ff410dec28780480b685f27769e8690 (patch)
tree736130119c1e93809dce3ccd8de6841621912cfd
parent0d431ccd6cc23cb1bd5153c6d4ea2c06b039b6c2 (diff)
Add --qemu-cpu option.
This new options allows to define which cpu QEMU should simulate. It has an effect only if QEMU is involved to run the tests. Change-Id: Ic001ec7874c384a2e013810a50cfaad4d5c331d0
-rwxr-xr-xabe.sh12
-rw-r--r--config/boards/qemu.exp3
-rw-r--r--config/linaro.exp6
-rwxr-xr-xlib/make.sh2
4 files changed, 21 insertions, 2 deletions
diff --git a/abe.sh b/abe.sh
index 5e27dcc9..02865de0 100755
--- a/abe.sh
+++ b/abe.sh
@@ -32,6 +32,7 @@ usage()
[--infrastructure] [--interactive]
[--list-artifacts <output_file>]
[--manifest <manifest_file>]
+ [--qemu-cpu <cpu>]
[--space <space needed>]
[--release <release_version_string>]
[--retrieve {<package>|all}]
@@ -232,6 +233,11 @@ OPTIONS
toolchain build from manifest files generated by a previous
build.
+ --qemu-cpu <cpu>
+
+ Specify which <cpu> value to use if testing uses
+ QEMU. Defaults to "any".
+
--space <space_needed>
Specify how much space (in KB) to check for in the build
@@ -781,6 +787,7 @@ do_build_stage=stage2
do_manifest=""
component_version_set=""
send_results_to=
+qemu_cpu="any"
declare -A extraconfig
@@ -898,6 +905,11 @@ while test $# -gt 0; do
--interactive)
interactive=yes
;;
+ --qemu-cpu)
+ check_directive qemu-cpu $2
+ qemu_cpu=$2
+ shift
+ ;;
--release)
check_directive release $2
release=$2
diff --git a/config/boards/qemu.exp b/config/boards/qemu.exp
index 01187a95..4fb478bb 100644
--- a/config/boards/qemu.exp
+++ b/config/boards/qemu.exp
@@ -9,4 +9,5 @@ case "$qemu_arch" in {
}
}
-set board_info($board,exec_shell) "[board_info $board exec_shell] setarch x86_64 -R qemu-$qemu_arch -cpu any -R 0 -L $sysroot"
+# qemu_cpu is set in linaro.exp
+set board_info($board,exec_shell) "[board_info $board exec_shell] setarch x86_64 -R qemu-$qemu_arch -cpu $qemu_cpu -R 0 -L $sysroot"
diff --git a/config/linaro.exp b/config/linaro.exp
index 1b43dd08..3b024d53 100644
--- a/config/linaro.exp
+++ b/config/linaro.exp
@@ -26,6 +26,12 @@ if {[info exists env(SYSROOT_UNDER_TEST)]} {
set native "native"
}
+if {[info exists env(QEMU_CPU_UNDER_TEST)]} {
+ set qemu_cpu "$env(QEMU_CPU_UNDER_TEST)"
+} else {
+ set qemu_cpu "any"
+}
+
case "$target_triplet" in {
{ "arm-*linux-gnueabi*" "armv[78]l-*linux-gnueabi*" "aarch64-*linux*" } {
case "$native" in {
diff --git a/lib/make.sh b/lib/make.sh
index 09b66578..e3ca67da 100755
--- a/lib/make.sh
+++ b/lib/make.sh
@@ -816,7 +816,7 @@ make_check()
for i in ${dirs}; do
# Always append "tee -a" to the log when building components individually
- dryrun "make ${check_targets} SYSROOT_UNDER_TEST=${sysroots} FLAGS_UNDER_TEST=\"\" PREFIX_UNDER_TEST=\"${local_builds}/destdir/${host}/bin/${target}-\" RUNTESTFLAGS=\"${runtest_flags}\" ${schroot_make_opts} ${make_flags} -w -i -k -C ${builddir}$i 2>&1 | tee -a ${checklog}"
+ dryrun "make ${check_targets} SYSROOT_UNDER_TEST=${sysroots} FLAGS_UNDER_TEST=\"\" PREFIX_UNDER_TEST=\"${local_builds}/destdir/${host}/bin/${target}-\" RUNTESTFLAGS=\"${runtest_flags}\" QEMU_CPU_UNDER_TEST=${qemu_cpu} ${schroot_make_opts} ${make_flags} -w -i -k -C ${builddir}$i 2>&1 | tee -a ${checklog}"
local result=$?
record_test_results "${component}" $2
if test $result -gt 0; then