From 196dd616ff023d4da457e00b1a4c63b5a5b4bcd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Sat, 3 Nov 2018 00:00:01 +0000 Subject: [PATCH] better build setups for testing and release --- README.adoc | 11 ++++------- bench-boot | 8 ++++++-- build | 18 ++++++++++++++++-- build-bench-boot | 15 +++++++++++++++ release | 4 ++-- 5 files changed, 43 insertions(+), 13 deletions(-) create mode 100755 build-bench-boot diff --git a/README.adoc b/README.adoc index 80f4eab..429ad9c 100644 --- a/README.adoc +++ b/README.adoc @@ -10493,11 +10493,10 @@ We tried to automate it on Travis with link:.travis.yml[] but it hits the curren ==== Benchmark Linux kernel boot -Benchmark all: +Run all kernel boot benchmarks for one arch: .... -./build all-linux -./bench-boot +./build-bench-boot --size 3 && ./bench-boot --size 3 cat "$(./getvar bench_boot)" .... @@ -11309,8 +11308,7 @@ It takes too much time to be feasible for every patch, but it should be done for ==== Automated tests .... -./build all-linux -./test --size 3 +./build-bench-boot --size 3 && ./test --size 3 echo $? .... @@ -11492,8 +11490,7 @@ TODO also run tests and only release if they pass. Create a zip containing all files required for <>: .... -./build all-linux -./release-zip +./build release && ./release-zip .... Source: link:release-zip[] diff --git a/bench-boot b/bench-boot index d2c676e..410e2a6 100755 --- a/bench-boot +++ b/bench-boot @@ -71,8 +71,6 @@ fi if [ "$test_size" -ge 3 ]; then bench "$arch --eval 'm5 exit' --gem5 -- --cpu-type=HPI ${caches}" gem5_insts "$arch" - bench "$arch --eval 'm5 exit' --gem5 --gem5-script biglittle" - gem5_insts "$arch" fi arch=aarch64 @@ -87,4 +85,10 @@ fi if [ "$test_size" -ge 3 ]; then bench "$arch --eval 'm5 exit' --gem5 -- --cpu-type=HPI ${caches}" gem5_insts "$arch" + #bench "$arch --eval 'm5 exit' --gem5 --gem5-script biglittle" + #gem5_insts "$arch" + bench "$arch --eval 'm5 exit' --gem5 --gem5-build-type fast" + gem5_insts "$arch" + bench "$arch --eval 'm5 exit' --gem5 --gem5-build-type debug" + gem5_insts "$arch" fi diff --git a/build b/build index 389081f..b4da027 100755 --- a/build +++ b/build @@ -58,6 +58,12 @@ name_to_component_map = { 'gem5': Component( lambda arch: run_cmd(['build-gem5'], arch), ), + 'gem5-debug': Component( + lambda arch: run_cmd(['build-gem5', '--gem5-build-type', 'debug'], arch), + ), + 'gem5-fast': Component( + lambda arch: run_cmd(['build-gem5', '--gem5-build-type', 'fast'], arch), + ), 'linux': Component( lambda arch: run_cmd(['build-linux'], arch), ), @@ -76,8 +82,9 @@ name_to_component_map = { # Dependency only nodes. 'all-linux': Component(dependencies=[ - 'qemu', - 'gem5-buildroot', + 'qemu-gem5-buildroot', + 'gem5-debug', + 'gem5-fast', ]), 'gem5-buildroot': Component(dependencies=[ 'buildroot-gcc', @@ -98,6 +105,13 @@ name_to_component_map = { 'overlay', 'linux', ]), + 'qemu-gem5-buildroot': Component(dependencies=[ + 'qemu', + 'gem5-buildroot', + ]), + 'release': Component(dependencies=[ + 'qemu-buildroot', + ]), 'all': Component(dependencies=[ 'all-linux', 'baremetal', diff --git a/build-bench-boot b/build-bench-boot new file mode 100755 index 0000000..34efc11 --- /dev/null +++ b/build-bench-boot @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -eu +test_size=1 +while [ $# -gt 0 ]; do + case "$1" in + --size) + test_size="$2" + shift 2 + ;; + esac +done +./build --all-archs qemu-gem5-buildroot +if [ "$test_size" -ge 3 ]; then + ./build --arch aarch64 all-linux +fi diff --git a/release b/release index 014cdaf..dc8cc54 100755 --- a/release +++ b/release @@ -19,12 +19,12 @@ start_time = time.time() # subprocess.check_call([os.path.join(common.root_dir, ''bench-all', '-A', '-u']) # A clean release requires a full rebuild unless we hack it :-( -# We can't just use our curent build as it contains packages we've +# We can't just use our current build as it contains packages we've # installed in random experiments. And with EXT2: we can't easily # know what the smallest root filesystem size is and use it either... # https://stackoverflow.com/questions/47320800/how-to-clean-only-target-in-buildroot subprocess.check_call([os.path.join(common.root_dir, 'configure'), '--all']) -subprocess.check_call([os.path.join(common.root_dir, 'build'), 'all-linux']) +subprocess.check_call([os.path.join(common.root_dir, 'build'), '--all-archs', 'release']) release_zip.main() subprocess.check_call(['git', 'push']) release_upload.main()