summaryrefslogtreecommitdiffhomepage
path: root/qemu_multiarch_testing/parallel-build-hdc-img.sh
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-10-05 09:04:04 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-10-05 09:04:04 +0200
commit12efcf3285a75d197704d2eef23824b3e4f11e66 (patch)
tree1e518da57b55f527768e2d5031a71fbdca0f998f /qemu_multiarch_testing/parallel-build-hdc-img.sh
parent28b00ce6ff8cde91f3e83632e705709b7cd2ab20 (diff)
Add qemu_multiarch_testing/
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'qemu_multiarch_testing/parallel-build-hdc-img.sh')
-rwxr-xr-xqemu_multiarch_testing/parallel-build-hdc-img.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/qemu_multiarch_testing/parallel-build-hdc-img.sh b/qemu_multiarch_testing/parallel-build-hdc-img.sh
new file mode 100755
index 000000000..9ee54ebb8
--- /dev/null
+++ b/qemu_multiarch_testing/parallel-build-hdc-img.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+export HDBMEGS=100
+keep_hdb=false
+
+build_in_dir()
+{
+ cd "$1" || exit 1
+ rm -f hdb.img
+ nice -n10 time ./native-build.sh ../hdc.img
+ $keep_hdb || rm -f hdb.img
+ echo >&3 "Finished: $1"
+}
+
+test "$1" = "-s" && {
+ dir="$2"
+ # single mode: build one directory, show output
+ test -d "$dir" || exit 1
+ test -e "$dir/native-build.sh" || exit 1
+ build_in_dir "$dir"
+ exit $?
+}
+
+started=false
+for dir; do
+ test -d "$dir" || continue
+ test -e "$dir/native-build.sh" || continue
+ echo "Starting: $dir"
+ build_in_dir "$dir" 3>&1 </dev/null >"$dir.log" 2>&1 &
+ started=true
+done
+
+$started || {
+ echo "Give me system-image-ARCH directories on command line"
+ exit 1
+}
+
+echo "Waiting to finish"
+wait
+echo "Done, check the logs"