From 82bf7543416e1255569375f75ec070856ecacc59 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 10 Mar 2020 08:46:35 +0100 Subject: [PATCH] Remove noux from tool-chain test Issue #3696 --- repos/ports/run/noux_tool_chain_auto.run | 300 ----------------------- repos/ports/run/tool_chain_auto.run | 260 ++++++++++++++++++++ tool/autopilot.list | 2 +- 3 files changed, 261 insertions(+), 301 deletions(-) delete mode 100644 repos/ports/run/noux_tool_chain_auto.run create mode 100644 repos/ports/run/tool_chain_auto.run diff --git a/repos/ports/run/noux_tool_chain_auto.run b/repos/ports/run/noux_tool_chain_auto.run deleted file mode 100644 index baaa0c8ab..000000000 --- a/repos/ports/run/noux_tool_chain_auto.run +++ /dev/null @@ -1,300 +0,0 @@ -# -# Configuration variables for the platform-specific run scripts: -# $platform - name of the platform passed to the 'create_builddir' script -# - -set verbose_mode "no" - -# -# The Linux version of Noux lacks the support for the fork system call. Hence, -# the run script is expected to fail. -# -if {[have_spec linux]} { - puts "Linux is unsupported." - exit 0 -} - -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] || - [expr [have_spec foc] && [have_spec imx7d_sabre]] } { - puts "Platform is unsupported." - exit 0 -} - - -set use_usb_input [expr ![have_spec ps2] && ![have_spec sdl] && [have_spec usb]] - -create_boot_directory - -set build_components { - core init timer noux lib/libc_noux - server/log_terminal server/ram_fs - test/libports/ncurses -} - -# -# 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} { } - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -lappend_if $use_usb_input build_components drivers/usb - -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 noux_boot_timeout 350 - - if {[have_spec panda]} { set platform "panda" } - if {[have_spec arndale]} { set platform "arndale" } - if {[have_spec pbxa9]} { set platform "pbxa9" } - if {[have_spec imx6q_sabrelite]} { set platform "imx6q_sabrelite" } - if {[have_spec imx7d_sabre]} { set platform "imx7d_sabre" } - - if {![info exists platform]} { - puts "\n Run script is not supported on this platform. \n" - exit 0 - } - -} - -if {[have_spec arm_64]} { - set binutils "binutils_arm_64" - set gcc "gcc_arm_64" - set tool_prefix "genode-aarch64-" - - set noux_boot_timeout 350 - set platform "arm_v8a" -} - -if {[have_spec x86]} { - set binutils "binutils_x86" - set gcc "gcc_x86" - set tool_prefix "genode-x86-" - - set noux_boot_timeout 100 - set platform "x86_64" -} - -# -# Build Noux packages only once -# -set noux_pkgs "bash coreutils vim grep sed findutils make which $binutils $gcc tclsh" - -foreach pkg $noux_pkgs { - 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 - -# write default .bash_profile file -set bash_profile_fd [open bin/bash_profile w] -puts $bash_profile_fd { -cp /bin/make /usr/bin/ -cp /bin/echo /usr/bin/ -cp /bin/mkdir /usr/bin/ -cp /bin/tclsh /usr/bin/ -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/$platform/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 - -append config { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -append config { - - -} - -if {![info exists verbose_mode]} {set verbose_mode "yes"} -append config " " - -append config { - -} - -foreach pkg $noux_pkgs { - append config " " } - -append config { - - - - - - -} append config " - -" append config { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -install_config $config - - -# -# Boot modules -# - -# generic modules -set boot_modules { - core init timer ld.lib.so noux log_terminal ram_fs - libc.lib.so vfs.lib.so libm.lib.so libc_noux.lib.so ncurses.lib.so stdcxx.lib.so - pcre.lib.so posix.lib.so vimrc bash_profile -} - -append boot_modules { gmp.lib.so mpfr.lib.so mpc.lib.so } - -foreach pkg $noux_pkgs { - lappend boot_modules "$pkg.tar" } - -append boot_modules { genode.tar } - -build_boot_image $boot_modules - - -append qemu_args " -nographic -m 768 " - -# wait until Noux started -run_genode_until {\[init -\> noux\].*--- noux started ---} $noux_boot_timeout -set serial_id [output_spawn_id] - -# start the measurement -set time_start [ clock seconds ] -run_genode_until {child /bin/bash exited with exit value 234} $tool_chain_timeout $serial_id - -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 : diff --git a/repos/ports/run/tool_chain_auto.run b/repos/ports/run/tool_chain_auto.run new file mode 100644 index 000000000..ff3a3221d --- /dev/null +++ b/repos/ports/run/tool_chain_auto.run @@ -0,0 +1,260 @@ +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] || + [expr [have_spec foc] && [have_spec 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 + + +# +# 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 noux_boot_timeout 350 +} + +if {[have_spec arm_64]} { + set binutils "binutils_arm_64" + set gcc "gcc_arm_64" + set tool_prefix "genode-aarch64-" + set noux_boot_timeout 350 + set platform "arm_v8a" +} + +if {[have_spec x86]} { + set binutils "binutils_x86" + set gcc "gcc_x86" + set tool_prefix "genode-x86-" + set noux_boot_timeout 250 + set platform "x86_64" +} + +# +# Build packages only once +# +set pkgs "$binutils $gcc" + +foreach pkg $pkgs { + lappend_if [expr ![file exists bin/$pkg]] build_components noux-pkg/$pkg } + +lappend build_components "lib/vfs/pipe" +lappend build_components "server/vfs" + +build $build_components + +# write default .bash_profile file +set bash_profile_fd [open bin/bash_profile w] +puts $bash_profile_fd { +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/$platform/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" +} + + +install_config { + + + + + + + + + + + + + + + + + + + + + + + + + + } [mounted_tar_archives] { + + + + + 2100-01-01 00:01 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + + +# +# Boot modules +# + +append boot_modules { bash_profile genode.tar gmp.lib.so mpfr.lib.so mpc.lib.so } +lappend boot_modules "$binutils.tar" "$gcc.tar" +lappend boot_modules libc.lib.so vfs.lib.so vfs_pipe.lib.so vfs + +build_boot_image $boot_modules + + +append qemu_args " -nographic -m 768 " + +# wait until Noux started +run_genode_until {.*\[init -> vfs\] creating build directory\.\.\..*\n} $noux_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 : diff --git a/tool/autopilot.list b/tool/autopilot.list index 96bc32058..644de543f 100644 --- a/tool/autopilot.list +++ b/tool/autopilot.list @@ -39,7 +39,7 @@ nic_router nic_router_flood nic_router_stress nic_router_uplinks -noux_tool_chain_auto +tool_chain_auto nvme ping ping_nic_router