autopilot: improve detection of genode dir

If the script is executed with an obscure path (e.g.,
'../tool/autopilot'), just taking the argv0 string fails. Therefore, the
file path is now normalized prior to the directory detection.
This commit is contained in:
Christian Helmuth
2013-11-27 10:57:24 +01:00
committed by Norman Feske
parent 6a395d9a29
commit 1ef8545469

View File

@@ -30,7 +30,7 @@ proc foreach_cmdline_arg { tag func } {
# #
proc genode_dir { } { proc genode_dir { } {
global argv0; global argv0;
return [file dirname [file dirname $argv0]] return [file dirname [file dirname [file normalize $argv0]]]
} }
@@ -325,7 +325,7 @@ foreach platform $platforms {
if {[execute_run_script $platform $run_script]} { if {[execute_run_script $platform $run_script]} {
puts stderr "-> OK" puts stderr "-> OK"
} else { } else {
if {[build_failed_because_of_missing_run_script $platform $run_script]} { if {[build_failed_because_of_missing_run_script $platform $run_script]} {
puts stderr "-> UNAVAILABLE" puts stderr "-> UNAVAILABLE"
} else { } else {