# # Build components # proc test_timeout { } { if {[have_spec foc] && [have_spec x86_64] && [have_include power_on/qemu]} { return 150 } else { return 60 } } proc enable_test_1 { } { return 1 } proc enable_test_2 { } { return 1 } proc enable_test_3 { } { return 1 } proc enable_test_4 { } { return 1 } proc enable_test_5 { } { return 1 } proc enable_test_6 { } { return 1 } proc enable_test_7 { } { return 1 } source ${genode_dir}/repos/libports/run/nic_router.inc lappend targets server/report_rom build $targets create_boot_directory # # Test 1 utilities # proc test_1_config { } { if {[enable_test_1]} { return " [client_config t1_d1_c1_udp udp 10.0.98.55 10.0.98.33 255.255.255.0 nic_router 1337 10.0.98.33] [client_config t1_d2_c1_udp udp 10.0.99.56 10.0.99.33 255.255.255.0 nic_router 999 10.0.99.55] [server_config t1_d2_s1_udp udp 10.0.99.55 10.0.99.33 255.255.255.0 nic_router 999 ]" } } proc test_1_router_config { } { if {[enable_test_1]} { return { } } } proc test_1_router_uplink_config { } { } # # Test 2 utilities # proc test_2_config { } { if {[enable_test_2]} { return " [client_config t2_d0_c1_udp udp 10.0.2.212 10.0.2.1 255.255.255.0 nic_bridge 1 10.0.2.55] [server_config t2_d1_s1_udp udp 18.17.16.15 18.17.16.14 255.255.0.0 nic_router 1 ]" } } proc test_2_router_config { } { if {[enable_test_2]} { return { } } } proc test_2_router_uplink_config { } { if {[enable_test_2]} { return { } } } # # Test 3 utilities # proc test_3_config { } { if {[enable_test_3]} { return " [client_config t3_d1_c1_udp udp 217.13.192.2 217.13.192.1 255.255.192.0 nic_router 65535 10.0.2.213] [server_config t3_d0_s1_udp udp 10.0.2.213 10.0.2.55 255.255.255.0 nic_bridge 65535 ]" } } proc test_3_router_config { } { if {[enable_test_3]} { return { } } } proc test_3_router_uplink_config { } { if {[enable_test_3]} { return { } } } # # Test 4 utilities # proc test_4_config { } { if {[enable_test_4]} { return " [client_config t4_d0_c1_tcp http 10.0.2.201 10.0.2.1 255.255.255.0 nic_bridge 80 10.0.2.55] [server_config t4_d1_s1_tcp http 192.168.1.18 192.168.1.1 255.255.255.0 nic_router 2048 ]" } } proc test_4_router_config { } { if {[enable_test_4]} { return { } } } proc test_4_router_uplink_config { } { if {[enable_test_4]} { return { } } } # # Test 5 utilities # proc test_5_config { } { if {[enable_test_5]} { return " [client_config t5_d0_c1_tcp http 10.0.2.202 10.0.2.1 255.255.255.0 nic_bridge 8080 10.0.2.55] [server_config t5_d1_s1_tcp http 192.168.2.72 192.168.2.1 255.255.255.0 nic_router 8080 ]" } } proc test_5_router_config { } { if {[enable_test_5]} { return { } } } proc test_5_router_uplink_config { } { if {[enable_test_5]} { return { } } } # # Test 6 utilities # proc test_6_config { } { if {[enable_test_6]} { return " [client_config t6_d1_c1_tcp http 100.200.0.128 100.200.0.1 255.255.0.0 nic_router 2345 10.0.2.203] [server_config t6_d0_s1_tcp http 10.0.2.203 10.0.2.1 255.255.255.0 nic_bridge 2345 ]" } } proc test_6_router_config { } { if {[enable_test_6]} { return { } } } proc test_6_router_uplink_config { } { if {[enable_test_6]} { return { } } } # # Test 7 utilities # proc test_7_config { } { if {[enable_test_7]} { append config " [client_config t7_d1_c1_tcp http dhcp dhcp dhcp t7_d1_nic_router 2345 10.13.78.204] [client_config t7_d1_c2_tcp http dhcp dhcp dhcp nic_router 3456 10.13.78.240] [client_config t7_d1_c3_tcp http dhcp dhcp dhcp nic_router 3456 10.13.78.240] [server_config t7_d2_s1_tcp http 10.13.78.204 10.13.78.1 255.255.255.0 nic_router 2345 ] [server_config t7_d2_s2_tcp http 10.13.78.240 10.13.78.1 255.255.255.0 nic_router 3456 ]" append config { } return $config } } proc test_7_router_config { } { if {[enable_test_7]} { return { } } } proc test_7_router_uplink_config { } { } # # Init config # append config { } [platform_drv_config] { } [test_1_router_uplink_config] { } [test_2_router_uplink_config] { } [test_3_router_uplink_config] { } [test_4_router_uplink_config] { } [test_5_router_uplink_config] { } [test_6_router_uplink_config] { } [test_7_router_uplink_config] { } [test_1_router_config] { } [test_2_router_config] { } [test_3_router_config] { } [test_4_router_config] { } [test_5_router_config] { } [test_6_router_config] { } [test_7_router_config] { } [test_1_config] { } [test_2_config] { } [test_3_config] { } [test_4_config] { } [test_5_config] { } [test_6_config] { } [test_7_config] { } install_config $config lappend boot_modules report_rom build_boot_image $boot_modules for {set i 0} {$i < $nr_of_clients} {incr i 1} { append done_string {.*Test done.*\n} } run_genode_until $done_string [test_timeout]