if {[get_cmd_switch --autopilot] && [have_include "power_on/qemu"]} { puts "\nRunning tool-chain auto test in autopilot on Qemu is not recommended." exit 0 } if {[have_spec pistachio] || [have_spec sel4] || [have_board imx53_qsb_tz] || [have_board rpi] || [expr [have_spec foc] && [have_board imx6q_sabrelite]] || [expr [have_spec foc] && [have_board imx7d_sabre]] } { puts "Platform is unsupported." exit 0 } create_boot_directory import_from_depot [depot_user]/src/[base_src] \ [depot_user]/src/init \ [depot_user]/src/posix \ [depot_user]/src/bash \ [depot_user]/src/coreutils \ [depot_user]/src/findutils \ [depot_user]/src/grep \ [depot_user]/src/sed \ [depot_user]/src/gnumake \ [depot_user]/src/which \ [depot_user]/src/tclsh \ [depot_user]/src/vfs \ [depot_user]/src/pcre \ [depot_user]/src/vfs_pipe \ [depot_user]/src/libc \ [depot_user]/src/stdcxx \ [depot_user]/src/fs_rom \ [depot_user]/src/cached_fs_rom \ [depot_user]/src/zlib # # Disable syntax check for config file # # The syntax check fails because the content of the '.bash_profile' is # specified using an '' node but it is no valid XML. I.e., xmllint # complains about the sequence '&&'. # proc check_xml_with_schema {xml_file} { } set cc_march "" set tool_chain_timeout 600 if {[have_spec arm]} { set binutils "binutils_arm" set gcc "gcc_arm" set tool_prefix "genode-arm-" set boot_timeout 350 set arch "arm_v7a" } if {[have_spec arm_64]} { set binutils "binutils_arm_64" set gcc "gcc_arm_64" set tool_prefix "genode-aarch64-" set boot_timeout 350 set arch "arm_v8a" } if {[have_spec x86]} { set binutils "binutils_x86" set gcc "gcc_x86" set tool_prefix "genode-x86-" set boot_timeout 250 set arch "x86_64" } set build_components { core lib/ld lib/vfs lib/vfs_pipe lib/libc server/vfs } # # Build packages only once # set pkgs "$binutils $gcc" foreach pkg $pkgs { lappend_if [expr ![file exists bin/$pkg]] build_components noux-pkg/$pkg } build $build_components # write default .bash_profile file set bash_profile_fd [open bin/bash_profile w] puts $bash_profile_fd { ln -s a /home/b ; rm /home/b # regression test for issue #4219 echo 'creating build directory...' mkdir -p "/home/build" cp -r /genode/depot /home/build } puts $bash_profile_fd "/genode/tool/depot/create DEPOT_DIR=/home/build/depot \ test/bin/$arch/zlib CROSS_DEV_PREFIX=$tool_prefix && exit 234" close $bash_profile_fd exec mkdir -p [depot_dir]/test exec $genode_dir/tool/depot/create DEPOT_DIR=[depot_dir] test/src/zlib exec tar cvf bin/genode.tar -C $genode_dir tool repos/base \ repos/libports/recipes/src/zlib \ repos/libports/recipes/api exec tar rvf bin/genode.tar -C [depot_dir]/.. [file tail [depot_dir]]/test exec rm -rf [depot_dir]/test proc mounted_tar_archives { } { global binutils gcc set archives "bash coreutils grep sed findutils make which $binutils $gcc tclsh" set result {} foreach archive $archives { append result "\t\t\t\t\n" } return $result } proc prefixed_nm { } { global tool_prefix return "${tool_prefix}nm" } proc fs_rom_binary { } { # # The cached_fs_rom server relies on managed dataspaces, which are not # fully available on all kernels. # if {[have_spec linux] || [have_spec fiasco] || [have_spec foc]} { return "fs_rom" } return "cached_fs_rom" } install_config { } [mounted_tar_archives] { 2030-01-01 00:01 } build_boot_image [list {*}[build_artifacts] bash_profile genode.tar $binutils.tar $gcc.tar] append qemu_args " -nographic -m 800 " # wait until Noux started run_genode_until {.*\[init -> vfs\] creating build directory\.\.\..*\n} $boot_timeout set run_id [output_spawn_id] puts "--- start of time measurement ---" set time_start [ clock seconds ] run_genode_until {.*"/bin/bash".* exited with exit value 234.*\n} $tool_chain_timeout $run_id puts "--- end of time measurement ---" set time_end [ clock seconds ] # 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 ] } 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" puts "Test succeeded" # vi: set ft=tcl :