better build setups for testing and release

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-11-03 00:00:01 +00:00
parent 9693c23fe6
commit 196dd616ff
5 changed files with 43 additions and 13 deletions

View File

@@ -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 Linux kernel boot
Benchmark all: Run all kernel boot benchmarks for one arch:
.... ....
./build all-linux ./build-bench-boot --size 3 && ./bench-boot --size 3
./bench-boot
cat "$(./getvar bench_boot)" 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 ==== Automated tests
.... ....
./build all-linux ./build-bench-boot --size 3 && ./test --size 3
./test --size 3
echo $? echo $?
.... ....
@@ -11492,8 +11490,7 @@ TODO also run tests and only release if they pass.
Create a zip containing all files required for <<prebuilt>>: Create a zip containing all files required for <<prebuilt>>:
.... ....
./build all-linux ./build release && ./release-zip
./release-zip
.... ....
Source: link:release-zip[] Source: link:release-zip[]

View File

@@ -71,8 +71,6 @@ fi
if [ "$test_size" -ge 3 ]; then if [ "$test_size" -ge 3 ]; then
bench "$arch --eval 'm5 exit' --gem5 -- --cpu-type=HPI ${caches}" bench "$arch --eval 'm5 exit' --gem5 -- --cpu-type=HPI ${caches}"
gem5_insts "$arch" gem5_insts "$arch"
bench "$arch --eval 'm5 exit' --gem5 --gem5-script biglittle"
gem5_insts "$arch"
fi fi
arch=aarch64 arch=aarch64
@@ -87,4 +85,10 @@ fi
if [ "$test_size" -ge 3 ]; then if [ "$test_size" -ge 3 ]; then
bench "$arch --eval 'm5 exit' --gem5 -- --cpu-type=HPI ${caches}" bench "$arch --eval 'm5 exit' --gem5 -- --cpu-type=HPI ${caches}"
gem5_insts "$arch" 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 fi

18
build
View File

@@ -58,6 +58,12 @@ name_to_component_map = {
'gem5': Component( 'gem5': Component(
lambda arch: run_cmd(['build-gem5'], arch), 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( 'linux': Component(
lambda arch: run_cmd(['build-linux'], arch), lambda arch: run_cmd(['build-linux'], arch),
), ),
@@ -76,8 +82,9 @@ name_to_component_map = {
# Dependency only nodes. # Dependency only nodes.
'all-linux': Component(dependencies=[ 'all-linux': Component(dependencies=[
'qemu', 'qemu-gem5-buildroot',
'gem5-buildroot', 'gem5-debug',
'gem5-fast',
]), ]),
'gem5-buildroot': Component(dependencies=[ 'gem5-buildroot': Component(dependencies=[
'buildroot-gcc', 'buildroot-gcc',
@@ -98,6 +105,13 @@ name_to_component_map = {
'overlay', 'overlay',
'linux', 'linux',
]), ]),
'qemu-gem5-buildroot': Component(dependencies=[
'qemu',
'gem5-buildroot',
]),
'release': Component(dependencies=[
'qemu-buildroot',
]),
'all': Component(dependencies=[ 'all': Component(dependencies=[
'all-linux', 'all-linux',
'baremetal', 'baremetal',

15
build-bench-boot Executable file
View File

@@ -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

View File

@@ -19,12 +19,12 @@ start_time = time.time()
# subprocess.check_call([os.path.join(common.root_dir, ''bench-all', '-A', '-u']) # subprocess.check_call([os.path.join(common.root_dir, ''bench-all', '-A', '-u'])
# A clean release requires a full rebuild unless we hack it :-( # 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 # installed in random experiments. And with EXT2: we can't easily
# know what the smallest root filesystem size is and use it either... # know what the smallest root filesystem size is and use it either...
# https://stackoverflow.com/questions/47320800/how-to-clean-only-target-in-buildroot # 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, '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() release_zip.main()
subprocess.check_call(['git', 'push']) subprocess.check_call(['git', 'push'])
release_upload.main() release_upload.main()