mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-29 13:44:26 +00:00
autopilot: create only missing builddirs on --keep
This improvement prevents multiple execution of create_builddir on existing directories.
This commit is contained in:
parent
1ef8545469
commit
31605fd85f
@ -45,10 +45,10 @@ proc help { } {
|
|||||||
|
|
||||||
set help_text {
|
set help_text {
|
||||||
Automatically execute test cases on different platforms
|
Automatically execute test cases on different platforms
|
||||||
|
|
||||||
usage: autopilot -p <platform> ... [-r <run-script> ...]
|
usage: autopilot -p <platform> ... [-r <run-script> ...]
|
||||||
[-d <test-dir>] [-j <make-jobs>]
|
[-d <test-dir>] [-j <make-jobs>]
|
||||||
[--help] [--cleanup] [--force]
|
[--help] [--cleanup] [--force] [--keep]
|
||||||
[--stdout] [--skip-clean-rules]
|
[--stdout] [--skip-clean-rules]
|
||||||
[--enable-ccache]
|
[--enable-ccache]
|
||||||
|
|
||||||
@ -272,13 +272,17 @@ if {[get_cmd_switch --force]} { wipe_test_dir }
|
|||||||
# create build directories
|
# create build directories
|
||||||
foreach platform $platforms {
|
foreach platform $platforms {
|
||||||
|
|
||||||
|
set build_dir [build_dir $platform]
|
||||||
|
|
||||||
|
if {[get_cmd_switch --keep] && [file exists $build_dir]} { continue }
|
||||||
|
|
||||||
if {[catch {
|
if {[catch {
|
||||||
exec [genode_dir]/tool/create_builddir $platform BUILD_DIR=[build_dir $platform]
|
exec [genode_dir]/tool/create_builddir $platform BUILD_DIR=$build_dir
|
||||||
}]} {
|
}]} {
|
||||||
fail "create_builddir for platform $platform failed" -1
|
fail "create_builddir for platform $platform failed" -1
|
||||||
}
|
}
|
||||||
|
|
||||||
set build_conf [file join [build_dir $platform] etc build.conf]
|
set build_conf [file join $build_dir etc build.conf]
|
||||||
if {![file exists $build_conf]} {
|
if {![file exists $build_conf]} {
|
||||||
fail "build dir for $platform lacks 'etc/build.conf' file" -2
|
fail "build dir for $platform lacks 'etc/build.conf' file" -2
|
||||||
}
|
}
|
||||||
@ -291,7 +295,7 @@ foreach platform $platforms {
|
|||||||
|
|
||||||
# optionally enable ccache
|
# optionally enable ccache
|
||||||
if {[get_cmd_switch --enable-ccache]} {
|
if {[get_cmd_switch --enable-ccache]} {
|
||||||
set tools_conf [file join [build_dir $platform] etc tools.conf]
|
set tools_conf [file join $build_dir etc tools.conf]
|
||||||
exec echo "CUSTOM_CC = ccache \$(CROSS_DEV_PREFIX)gcc" >> $tools_conf
|
exec echo "CUSTOM_CC = ccache \$(CROSS_DEV_PREFIX)gcc" >> $tools_conf
|
||||||
exec echo "CUSTOM_CXX = ccache \$(CROSS_DEV_PREFIX)g++" >> $tools_conf
|
exec echo "CUSTOM_CXX = ccache \$(CROSS_DEV_PREFIX)g++" >> $tools_conf
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user