mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-28 21:24:26 +00:00
run: check for netperf version in user environment
For native Genode netperf port.
This commit is contained in:
parent
4807d469ca
commit
400037a5b0
@ -9,18 +9,24 @@
|
|||||||
# Build
|
# Build
|
||||||
#
|
#
|
||||||
|
|
||||||
if {![file exists bin/netperf_host]} {
|
set version "2.6.0"
|
||||||
puts "\nPlease compile a netperf client of version 2.6.0 for your host system."
|
|
||||||
puts "The sources are available in 'ports/contrib/netperf'."
|
|
||||||
puts "Please copy the 'netperf' binary to '<build_dir>/bin/netperf_host'.\n"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# sanity check that the right version is used
|
# sanity check that the right version is used
|
||||||
spawn bin/netperf_host -V
|
set wrong_version [catch {
|
||||||
expect {
|
spawn netperf-$version -V
|
||||||
{Netperf version 2.6.0} { }
|
expect {
|
||||||
eof { puts "\nError: unsupported netperf version.\n"; exit 1 }
|
{Netperf version 2.6.0} { }
|
||||||
|
eof { return }
|
||||||
|
timeout { return }
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
|
||||||
|
if {$wrong_version} {
|
||||||
|
puts -nonewline "\nPlease compile a netperf client of version $version "
|
||||||
|
puts "for your host system."
|
||||||
|
puts "The sources are available in 'ports/contrib/netperf'."
|
||||||
|
puts "Please name the binary netperf-$version\n"
|
||||||
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# netperf configuration
|
# netperf configuration
|
||||||
@ -218,7 +224,7 @@ if [is_qemu_available] {
|
|||||||
foreach netperf_test $netperf_tests {
|
foreach netperf_test $netperf_tests {
|
||||||
puts "\n---------------------------- $netperf_test -----------------------"
|
puts "\n---------------------------- $netperf_test -----------------------"
|
||||||
|
|
||||||
spawn bin/netperf_host -H $ip_addr -P 1 -v 2 -t $netperf_test -c -C -- -m $packet_size $force_ports
|
spawn netperf-$version -H $ip_addr -P 1 -v 2 -t $netperf_test -c -C -- -m $packet_size $force_ports
|
||||||
set netperf_id $spawn_id
|
set netperf_id $spawn_id
|
||||||
|
|
||||||
run_genode_until "Segment" 60 $netperf_id
|
run_genode_until "Segment" 60 $netperf_id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user