Skip to content

Commit 07d58ae

Browse files
committed
tests_rv: Fixes for the build/boot scripts
Some fixes: - Use "-z none" when possible. This reduces the buildtime - Formatting: Remove tabs - Warnings/error are printed to stdout, not stderr, so let us use stdout. - allmodconfig is simply too slow -- use defconfig until ccache works. Signed-off-by: Björn Töpel <[email protected]>
1 parent 9250d8f commit 07d58ae

File tree

4 files changed

+32
-22
lines changed

4 files changed

+32
-22
lines changed

tests_rv/patch/build_allmod_rv64_clang/build_allmod_rv64_clang.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ tmpdir=$(mktemp -d)
77
rc=0
88

99
tuxmake --wrapper ccache --target-arch riscv --runtime podman --directory . \
10-
--environment=KBUILD_BUILD_TIMESTAMP=@1621270510 \
11-
--environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake \
12-
-o $tmpdir --toolchain llvm-nightly allmodconfig || rc=1
10+
--environment=KBUILD_BUILD_TIMESTAMP=@1621270510 \
11+
--environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake \
12+
-o $tmpdir --toolchain llvm-nightly -z none allmodconfig || rc=1
1313

1414
if [ $rc -ne 0 ]; then
1515
echo "Build failed" >&$DESC_FD

tests_rv/patch/build_boot_rv64/build_boot_rv64.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,20 @@ tmpdir=$(mktemp -d)
77
rc=0
88

99
tuxmake --wrapper ccache --target-arch riscv --runtime podman --directory . \
10-
--environment=KBUILD_BUILD_TIMESTAMP=@1621270510 \
11-
--environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake \
12-
-o $tmpdir --toolchain gcc-11 || rc=1
10+
--environment=KBUILD_BUILD_TIMESTAMP=@1621270510 \
11+
--environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake \
12+
-o $tmpdir --toolchain gcc-11 || rc=1
13+
14+
# FIXME: Add -z none to tuxmake (reduce build time), but tuxrun bailes out. :-(
1315

1416
if [ $rc -ne 0 ]; then
1517
echo "Build failed" >&$DESC_FD
1618
else
17-
tuxrun --device qemu-riscv64 --tuxmake $tmpdir --runtime podman || rc=1
19+
tuxrun --device qemu-riscv64 --tuxmake $tmpdir --runtime podmap || rc=1
1820
if [ $rc -ne 0 ]; then
1921
echo "Boot/poweroff failed" >&$DESC_FD
22+
else
23+
echo "Build and boot/poweroff OK" >&$DESC_FD
2024
fi
2125
fi
2226

tests_rv/patch/build_boot_rv64_clang/build_boot_rv64_clang.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,20 @@ tmpdir=$(mktemp -d)
77
rc=0
88

99
tuxmake --wrapper ccache --target-arch riscv --runtime podman --directory . \
10-
--environment=KBUILD_BUILD_TIMESTAMP=@1621270510 \
11-
--environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake \
12-
-o $tmpdir --toolchain llvm-nightly || rc=1
10+
--environment=KBUILD_BUILD_TIMESTAMP=@1621270510 \
11+
--environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake \
12+
-o $tmpdir --toolchain llvm-nightly || rc=1
13+
14+
# FIXME: Add -z none to tuxmake (reduce build time), but tuxrun bailes out. :-(
1315

1416
if [ $rc -ne 0 ]; then
1517
echo "Build failed" >&$DESC_FD
1618
else
17-
tuxrun --device qemu-riscv64 --tuxmake $tmpdir --runtime podman || rc=1
19+
tuxrun --device qemu-riscv64 --tuxmake $tmpdir --runtime docker || rc=1
1820
if [ $rc -ne 0 ]; then
1921
echo "Boot/poweroff failed" >&$DESC_FD
22+
else
23+
echo "Build and boot/poweroff OK" >&$DESC_FD
2024
fi
2125
fi
2226

tests_rv/patch/build_warn_rv64/build_warn_rv64.sh

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,33 @@ git log -1 --pretty='%h ("%s")' HEAD~
2323

2424
echo "Baseline building the tree"
2525

26+
# FIXME: Build allmodconfig. For some reason ccache is not working for allmodconfig
27+
2628
tuxmake --wrapper ccache --target-arch riscv --runtime podman --directory . \
27-
--environment=KBUILD_BUILD_TIMESTAMP=@1621270510 \
28-
--environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake \
29-
-o $tmpdir0 --toolchain gcc-11 --kconfig allmodconfig -K CONFIG_WERROR=n W=1
29+
--environment=KBUILD_BUILD_TIMESTAMP=@1621270510 \
30+
--environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake \
31+
-o $tmpdir0 --toolchain gcc-11 -z none --kconfig defconfig -K CONFIG_WERROR=n W=1
3032

3133
git checkout -q HEAD~
3234

3335
echo "Building the tree before the patch"
3436

3537
tuxmake --wrapper ccache --target-arch riscv --runtime podman --directory . \
36-
--environment=KBUILD_BUILD_TIMESTAMP=@1621270510 \
37-
--environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake \
38-
-o $tmpdir1 --toolchain gcc-11 --kconfig allmodconfig -K CONFIG_WERROR=n W=1 \
39-
2> >(tee $tmpfile_o >&2)
38+
--environment=KBUILD_BUILD_TIMESTAMP=@1621270510 \
39+
--environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake \
40+
-o $tmpdir1 --toolchain gcc-11 -z none --kconfig defconfig -K CONFIG_WERROR=n W=1 \
41+
> >(tee $tmpfile_o)
4042
incumbent=$(grep -i -c "\(warn\|error\)" $tmpfile_o)
4143

4244
echo "Building the tree with the patch"
4345

4446
git checkout -q $HEAD
4547

4648
tuxmake --wrapper ccache --target-arch riscv --runtime podman --directory . \
47-
--environment=KBUILD_BUILD_TIMESTAMP=@1621270510 \
48-
--environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake \
49-
-o $tmpdir2 --toolchain gcc-11 --kconfig allmodconfig -K CONFIG_WERROR=n W=1 \
50-
2> >(tee $tmpfile_n >&2) || rc=1
49+
--environment=KBUILD_BUILD_TIMESTAMP=@1621270510 \
50+
--environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake \
51+
-o $tmpdir2 --toolchain gcc-11 -z none --kconfig defconfig -K CONFIG_WERROR=n W=1 \
52+
> >(tee $tmpfile_n) || rc=1
5153

5254
current=$(grep -i -c "\(warn\|error\)" $tmpfile_n)
5355

0 commit comments

Comments
 (0)