]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Add RTEMS gateway benchmark to continuous tests
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 27 Feb 2014 13:53:25 +0000 (14:53 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 27 Feb 2014 13:53:25 +0000 (14:53 +0100)
continuous/gw-setup/run.pl
continuous/tests/rtemsgw [new file with mode: 0755]

index f1bfe33fcca9fddf8bde06d1f7fdd8682bec55c8..f594fad3960021386c106a87b3bc2f46a05aefaa 100755 (executable)
@@ -14,7 +14,9 @@ $|=1;
 
 my $ready;
 while (<$boot>){
 
 my $ready;
 while (<$boot>){
-  last if ($ready = /Welcome to Buildroot/ || /UGW started/);
+    last if ($ready = m/Welcome to Buildroot/ ||
+                     m/UGW started/ ||
+                     m/t...a...s...k...s... ...s...t...a...r...t...e...d/); # RTEMS has bug - it sends 4 characters instead of just one
 }
 die "Boot failed" unless $ready;
 
 }
 die "Boot failed" unless $ready;
 
@@ -42,9 +44,7 @@ sub kill_boot() { kill('TERM', -$pid) if defined $pid; }
 sub run_boot()
 {
     # die("No boot command") if ($#ARGV eq -1);
 sub run_boot()
 {
     # die("No boot command") if ($#ARGV eq -1);
-    my $bootcmd = "'".join("' '", @ARGV)."'";
-
-    $bootcmd ||= "$FindBin::Bin/boot";
+    my $bootcmd = scalar @ARGV ? "'".join("' '", @ARGV)."'" : "$FindBin::Bin/boot";
 
     $SIG{INT} = sub { kill_boot(); exit; };
 
 
     $SIG{INT} = sub { kill_boot(); exit; };
 
diff --git a/continuous/tests/rtemsgw b/continuous/tests/rtemsgw
new file mode 100755 (executable)
index 0000000..3bba1eb
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+. lib.sh
+
+WVSTART "RTEMS gateway"
+
+../gw-setup/run.pl ../../rtems/gw/boot --expect-raw '"]", sub { shift->send_slow(0.1, "startGW\n"); }'