2013-03-08 09:45:44 +00:00
|
|
|
#
|
|
|
|
# \brief Noux environment for building the Genode/NOVA demo scenario on Genode
|
|
|
|
# \author Christian Prochaska
|
|
|
|
# \date 2012-11-26
|
|
|
|
#
|
|
|
|
|
2015-01-08 21:09:08 +00:00
|
|
|
if {[have_include "power_on/qemu"]} {
|
2013-12-03 09:23:22 +00:00
|
|
|
puts "\nAuto test running on Qemu is not recommended.\n"
|
2013-11-08 10:15:52 +00:00
|
|
|
exit 0
|
2013-07-22 12:37:49 +00:00
|
|
|
}
|
2017-01-03 12:17:41 +00:00
|
|
|
|
2016-08-05 11:30:07 +00:00
|
|
|
if {[have_spec pistachio] || [have_spec sel4]} {
|
|
|
|
puts "Platform is unsupported."
|
2013-07-22 12:37:49 +00:00
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-11-08 10:15:52 +00:00
|
|
|
set verbose_mode "no"
|
|
|
|
|
2013-03-08 09:45:44 +00:00
|
|
|
set platform_pkgs ""
|
|
|
|
set platform_cmds {
|
2017-01-03 12:17:41 +00:00
|
|
|
make core KERNEL=hw &&
|
2013-03-08 09:45:44 +00:00
|
|
|
exit 234
|
2014-05-07 09:48:19 +00:00
|
|
|
}
|
2017-01-03 12:17:41 +00:00
|
|
|
set platform_base_dir "base-hw"
|
2013-11-08 10:15:52 +00:00
|
|
|
|
|
|
|
if {[have_spec arm]} {
|
2013-12-06 10:53:52 +00:00
|
|
|
set noux_boot_timeout 350
|
2014-10-20 09:21:57 +00:00
|
|
|
set tool_chain_timeout 600
|
2013-11-08 10:15:52 +00:00
|
|
|
|
2015-09-03 12:55:05 +00:00
|
|
|
if {[have_spec panda]} {
|
2017-01-03 12:17:41 +00:00
|
|
|
set platform "panda"
|
2015-10-16 08:39:47 +00:00
|
|
|
set tool_chain_timeout 1500
|
2013-12-06 10:53:52 +00:00
|
|
|
}
|
2015-09-03 12:55:05 +00:00
|
|
|
if {[have_spec arndale]} {
|
2017-01-03 12:17:41 +00:00
|
|
|
set platform "arndale"
|
2015-10-16 08:39:47 +00:00
|
|
|
set tool_chain_timeout 1500
|
2013-12-06 10:53:52 +00:00
|
|
|
}
|
2017-01-03 12:17:41 +00:00
|
|
|
if {[have_spec pbxa9]} { set platform "pbxa9" }
|
2013-11-08 10:15:52 +00:00
|
|
|
|
|
|
|
if {![info exists platform]} {
|
2013-12-06 10:53:52 +00:00
|
|
|
puts "\n Run script is not supported on this platform. \n"
|
2013-11-08 10:15:52 +00:00
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if {[have_spec x86]} {
|
2014-10-20 09:21:57 +00:00
|
|
|
set noux_boot_timeout 100
|
2016-03-01 17:03:35 +00:00
|
|
|
set tool_chain_timeout 450
|
2017-01-03 12:17:41 +00:00
|
|
|
set platform "x86_64"
|
2014-10-20 09:21:57 +00:00
|
|
|
|
2016-03-01 17:03:35 +00:00
|
|
|
if {[have_spec foc]} {
|
2016-04-04 15:41:52 +00:00
|
|
|
set tool_chain_timeout 850
|
2014-03-22 16:24:14 +00:00
|
|
|
}
|
2013-11-08 10:15:52 +00:00
|
|
|
}
|
2013-03-08 09:45:44 +00:00
|
|
|
|
2014-05-07 09:48:19 +00:00
|
|
|
source ${genode_dir}/repos/ports/run/noux_tool_chain.inc
|
2013-03-08 09:45:44 +00:00
|
|
|
|
|
|
|
append qemu_args " -m 768 "
|
|
|
|
|
2013-08-22 10:04:37 +00:00
|
|
|
# wait until Noux started
|
2013-12-06 10:53:52 +00:00
|
|
|
run_genode_until {\[init -\> noux\].*--- noux started ---} $noux_boot_timeout
|
2015-01-08 21:09:08 +00:00
|
|
|
set serial_id [output_spawn_id]
|
2013-03-08 09:45:44 +00:00
|
|
|
|
2013-08-22 10:04:37 +00:00
|
|
|
# start the measurement
|
|
|
|
set time_start [ clock seconds ]
|
2013-12-06 10:53:52 +00:00
|
|
|
run_genode_until {child /bin/bash exited with exit value 234} $tool_chain_timeout $serial_id
|
2013-03-08 09:45:44 +00:00
|
|
|
|
|
|
|
set time_end [ clock seconds ]
|
2013-07-22 12:37:49 +00:00
|
|
|
|
|
|
|
# cleanup created tars
|
|
|
|
exec rm -f bin/genode.tar
|
|
|
|
|
|
|
|
# print infos about run
|
|
|
|
set git_info "unknown"
|
|
|
|
catch { set git_info [exec git --git-dir=$genode_dir/.git describe ] }
|
2013-03-08 09:45:44 +00:00
|
|
|
|
|
|
|
puts "Testing \" [ clock format $time_start -format "%Y-%m-%d %H:%M:%S"], commit: ($git_info)\" in : "
|
|
|
|
puts "Testing \"all\" in printf.wv:"
|
|
|
|
puts "! PERF: runtime [expr $time_end - $time_start ] seconds ok"
|
2013-07-22 12:37:49 +00:00
|
|
|
|
2013-03-08 09:45:44 +00:00
|
|
|
puts "Test succeeded"
|