if { ![have_spec foc] && ![have_spec nova] && ![have_spec okl4] && ![have_spec sel4] } { puts "Run script is not supported on this platform" exit 0 } create_boot_directory import_from_depot genodelabs/src/[base_src] \ genodelabs/pkg/[drivers_interactive_pkg] \ genodelabs/pkg/terminal \ genodelabs/src/init \ genodelabs/src/noux \ genodelabs/src/posix \ genodelabs/src/ram_fs \ genodelabs/src/log_terminal \ genodelabs/src/ncurses \ genodelabs/src/bash-minimal \ genodelabs/src/vim-minimal \ genodelabs/src/coreutils-minimal set build_components { server/fs_log server/cpu_sampler test/cpu_sampler } if {[have_spec foc] || [have_spec nova]} { lappend build_components lib/cpu_sampler_platform-$::env(KERNEL) } else { lappend build_components lib/cpu_sampler_platform-generic } # # Build Noux packages only once # foreach pkg {diffutils} { lappend_if [expr ![file exists bin/$pkg]] build_components noux-pkg/$pkg } build $build_components # write default vimrc file set vimrc_fd [open "bin/vimrc" w] puts $vimrc_fd { set noloadplugins set hls set nocompatible set laststatus=2 set noswapfile set viminfo=} close $vimrc_fd append config { } append_if [get_cmd_switch --autopilot] config { } append_if [expr ![get_cmd_switch --autopilot]] config { } append config { } append_if [get_cmd_switch --autopilot] config { FILE=/samples/cpu_sampler/samples/test-cpu_sampler/ep.*.log while true; do if [ -e $FILE ]; then cat $FILE; fi; done } append_if [expr ![get_cmd_switch --autopilot]] config { echo "The sample data will appear in the /samples directory" } append config { } install_config $config # # Boot modules # # evaluated by the run tool proc binary_name_cpu_sampler_platform_lib_so { } { if {[have_spec foc] || [have_spec nova]} { return "cpu_sampler_platform-$::env(KERNEL).lib.so" } else { return "cpu_sampler_platform-generic.lib.so" } } build_boot_image { diffutils.tar vimrc fs_log cpu_sampler cpu_sampler_platform.lib.so test-cpu_sampler } if { ![get_cmd_switch --autopilot] } { run_genode_until forever } # autopilot test append qemu_args " -nographic " set match_string "Test started. func: 0x(\[0-9a-f\]+).*\n" run_genode_until "$match_string" 120 regexp $match_string $output all func run_genode_until "\\\[init -> terminal] \[0\]*$func" 90 [output_spawn_id]