docker: Build in a clean directory
PATCH 1/1 docker: Build in a clean directory
Currently we configure and build under "$QEMU_SRC/tests/docker" which is dubious, create a fixed directory (to be friendly to ccache) and change to there before calling build_qemu.
--- tests/docker/common.rc | 3 +++ tests/docker/test-clang | 2 ++ tests/docker/test-full | 2 ++ tests/docker/test-mingw | 2 ++ tests/docker/test-quick | 2 ++ 5 files changed, 11 insertions(+)
tests/docker/common.rc +3 -0
@@ -11,6 +11,9 @@ # or (at your option) any later version. See the COPYING file in # the top-level directory. +BUILD_DIR=/var/tmp/qemu-build +mkdir $BUILD_DIR + requires() { for c in $@; do
tests/docker/test-clang +2 -0
@@ -15,6 +15,8 @@ requires clang +cd "$BUILD_DIR" + OPTS="--enable-debug --cxx=clang++ --cc=clang --host-cc=clang" # -fsanitize=undefined is broken on Fedora 23, skip it for now # See also: https://bugzilla.redhat.com/show_bug.cgi?id=1263834
tests/docker/test-full +2 -0
@@ -13,5 +13,7 @@ . common.rc +cd "$BUILD_DIR" + build_qemu make check $MAKEFLAGS
tests/docker/test-mingw +2 -0
@@ -15,6 +15,8 @@ requires mingw dtc +cd "$BUILD_DIR" + for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do TARGET_LIST=x86_64-softmmu,aarch64-softmmu \ build_qemu --cross-prefix=$prefix \
tests/docker/test-quick +2 -0
@@ -13,6 +13,8 @@ . common.rc +cd "$BUILD_DIR" + DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu" TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \ build_qemu
Signature · 1 line
2.7.4
Quoted 2 lines · Fam Zheng
Currently we configure and build under "$QEMU_SRC/tests/docker" which is dubious, create a fixed directory (to be friendly to ccache) and change
Period instead of comma, to help the reader understand where the part describing the current state ends, and the part describing the change starts.
Quoted 3 lines
to there before calling
build_qemu.Signed-off-by Fam Zheng <[email protected]>
Quoted 8 lines · Markus Armbruster
Quoted 2 lines · Fam Zheng
Currently we configure and build under "$QEMU_SRC/tests/docker" which is dubious, create a fixed directory (to be friendly to ccache) and change
Period instead of comma, to help the reader understand where the part describing the current state ends, and the part describing the change starts.
Yes! Sorry for the confusion!
Fam
Quoted 4 lines
Quoted 4 lines
to there before calling
build_qemu.Signed-off-by Fam Zheng <[email protected]>
Quoted 18 lines · Fam Zheng
Currently we configure and build under "$QEMU_SRC/tests/docker" which is dubious, create a fixed directory (to be friendly to ccache) and change to there before calling
build_qemu.Signed-off-by Fam Zheng <[email protected]>--- tests/docker/common.rc | 3 +++ tests/docker/test-clang | 2 ++ tests/docker/test-full | 2 ++ tests/docker/test-mingw | 2 ++ tests/docker/test-quick | 2 ++ 5 files changed, 11 insertions(+)tests/docker/common.rc +0
-0
tests/docker/common.rc line 15
Quoted 5 lines
tests/docker/common.rc +2
-0@@ -11,6 +11,9 @@ # or (at your option) any later version. See the COPYING file in # the top-level directory. +BUILD_DIR=/var/tmp/qemu-build +mkdir $BUILD_DIR
Is that safe on multi-user machines?
Also should we honour $TMPDIR if set?
Quoted 47 lines
tests/docker/common.rc +1
-0+ requires() { for c in $@; dotests/docker/test-clang +2
-0@@ -15,6 +15,8 @@ requires clang +cd "$BUILD_DIR" + OPTS="--enable-debug --cxx=clang++ --cc=clang --host-cc=clang" # -fsanitize=undefined is broken on Fedora 23, skip it for now # See also: https://bugzilla.redhat.com/show_bug.cgi?id=1263834tests/docker/test-full +2
-0@@ -13,5 +13,7 @@ . common.rc +cd "$BUILD_DIR" + build_qemu make check $MAKEFLAGStests/docker/test-mingw +2
-0@@ -15,6 +15,8 @@ requires mingw dtc +cd "$BUILD_DIR" + for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do TARGET_LIST=x86_64-softmmu,aarch64-softmmu \ build_qemu --cross-prefix=$prefix \tests/docker/test-quick +0
-0
tests/docker/test-quick line 20
Quoted 8 lines
tests/docker/test-quick +2
-0@@ -13,6 +13,8 @@ . common.rc +cd "$BUILD_DIR" + DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu" TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \ build_qemu
--
Alex Bennée
Quoted 24 lines · Alex Bennée
Quoted 21 lines · Fam Zheng
Currently we configure and build under "$QEMU_SRC/tests/docker" which is dubious, create a fixed directory (to be friendly to ccache) and change to there before calling
build_qemu.Signed-off-by Fam Zheng <[email protected]>--- tests/docker/common.rc | 3 +++ tests/docker/test-clang | 2 ++ tests/docker/test-full | 2 ++ tests/docker/test-mingw | 2 ++ tests/docker/test-quick | 2 ++ 5 files changed, 11 insertions(+)tests/docker/common.rc +0
-0@@ -11,6 +11,9 @@ # or (at your option) any later version. See the COPYING file in # the top-level directory.
Quoted 6 lines
tests/docker/common.rc line 15
Quoted 2 lines
tests/docker/common.rc +2
-0+BUILD_DIR=/var/tmp/qemu-build +mkdir $BUILD_DIRIs that safe on multi-user machines?
Also should we honour $TMPDIR if set?
It's not, but containers are not multi-user, at least not here in QEMU docker testing. We already use a fixed directory before this change, which is $QEMU_SRC/tests/docker, so this patch is not making it worse.
And we know $TMPDIR is not set, too.
Fam
Quoted 60 lines
Quoted 48 lines
tests/docker/common.rc +1
-0+ requires() { for c in $@; dotests/docker/test-clang +2
-0@@ -15,6 +15,8 @@ requires clang +cd "$BUILD_DIR" + OPTS="--enable-debug --cxx=clang++ --cc=clang --host-cc=clang" # -fsanitize=undefined is broken on Fedora 23, skip it for now # See also: https://bugzilla.redhat.com/show_bug.cgi?id=1263834tests/docker/test-full +2
-0@@ -13,5 +13,7 @@ . common.rc +cd "$BUILD_DIR" + build_qemu make check $MAKEFLAGStests/docker/test-mingw +2
-0@@ -15,6 +15,8 @@ requires mingw dtc +cd "$BUILD_DIR" + for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do TARGET_LIST=x86_64-softmmu,aarch64-softmmu \ build_qemu --cross-prefix=$prefix \tests/docker/test-quick +0
-0tests/docker/test-quick line 20
Quoted 8 lines
tests/docker/test-quick +2
-0@@ -13,6 +13,8 @@ . common.rc +cd "$BUILD_DIR" + DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu" TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \ build_qemu--
Alex Bennée