mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-20 06:07:59 +00:00
autopilot: append RUN_OPT also with --keep
In case RUN_OPT_AUTOPILOT is changed on consecutive calls of "autopilot --keep", the changes are now effectively propagated to the run tool. I also documented the RUN_OPT_AUTOPILOT environment variable.
This commit is contained in:
parent
984bddcedd
commit
cea842b256
@ -70,6 +70,12 @@ proc help { } {
|
|||||||
--skip-clean-rules skip cleanall tests, keep build-directory content
|
--skip-clean-rules skip cleanall tests, keep build-directory content
|
||||||
--stdout print test output instead of writing log files
|
--stdout print test output instead of writing log files
|
||||||
--time-stamp prepend log output lines with time stamps (requires ts utility)
|
--time-stamp prepend log output lines with time stamps (requires ts utility)
|
||||||
|
|
||||||
|
The environment variable RUN_OPT_AUTOPILOT may be set to propagate
|
||||||
|
custom RUN_OPTs to the run tool executed. In any case autopilot
|
||||||
|
appends RUN_OPT like follows.
|
||||||
|
|
||||||
|
RUN_OPT += --autopilot
|
||||||
}
|
}
|
||||||
|
|
||||||
append help_text "\ndefault test directory is [default_test_dir]\n"
|
append help_text "\ndefault test directory is [default_test_dir]\n"
|
||||||
@ -346,12 +352,26 @@ if {[file exists $test_dir] && ![get_cmd_switch --force] &&
|
|||||||
if {[get_cmd_switch --force]} { wipe_test_dir }
|
if {[get_cmd_switch --force]} { wipe_test_dir }
|
||||||
|
|
||||||
|
|
||||||
|
proc append_run_opt { build_conf } {
|
||||||
|
if {[info exists ::env(RUN_OPT_AUTOPILOT)]} {
|
||||||
|
exec echo "RUN_OPT = --include boot_dir/\$(KERNEL)" >> $build_conf
|
||||||
|
exec echo "RUN_OPT += $::env(RUN_OPT_AUTOPILOT)" >> $build_conf
|
||||||
|
}
|
||||||
|
|
||||||
|
exec echo "RUN_OPT += --autopilot" >> $build_conf
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# create build directories
|
# create build directories
|
||||||
foreach arch $architectures {
|
foreach arch $architectures {
|
||||||
|
|
||||||
set build_dir [build_dir $arch]
|
set build_dir [build_dir $arch]
|
||||||
|
set build_conf [file join $build_dir etc build.conf]
|
||||||
|
|
||||||
if {[get_cmd_switch --keep] && [file exists $build_dir]} { continue }
|
if {[get_cmd_switch --keep] && [file exists $build_dir]} {
|
||||||
|
append_run_opt $build_conf
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if {[catch {
|
if {[catch {
|
||||||
exec [genode_dir]/tool/create_builddir $arch BUILD_DIR=$build_dir
|
exec [genode_dir]/tool/create_builddir $arch BUILD_DIR=$build_dir
|
||||||
@ -359,7 +379,6 @@ foreach arch $architectures {
|
|||||||
fail "create_builddir for architecture $arch failed" -1
|
fail "create_builddir for architecture $arch failed" -1
|
||||||
}
|
}
|
||||||
|
|
||||||
set build_conf [file join $build_dir etc build.conf]
|
|
||||||
if {![file exists $build_conf]} {
|
if {![file exists $build_conf]} {
|
||||||
fail "build dir for $arch lacks 'etc/build.conf' file" -2
|
fail "build dir for $arch lacks 'etc/build.conf' file" -2
|
||||||
}
|
}
|
||||||
@ -377,12 +396,7 @@ foreach arch $architectures {
|
|||||||
exec echo "CUSTOM_CXX = ccache \$(CROSS_DEV_PREFIX)g++" >> $tools_conf
|
exec echo "CUSTOM_CXX = ccache \$(CROSS_DEV_PREFIX)g++" >> $tools_conf
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[info exists ::env(RUN_OPT_AUTOPILOT)]} {
|
append_run_opt $build_conf
|
||||||
exec echo "RUN_OPT = --include boot_dir/\$(KERNEL)" >> $build_conf
|
|
||||||
exec echo "RUN_OPT += $::env(RUN_OPT_AUTOPILOT)" >> $build_conf
|
|
||||||
}
|
|
||||||
|
|
||||||
exec echo "RUN_OPT += --autopilot" >> $build_conf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user