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