Making upload tests skip if the hardware isn't detected on the host.

This commit is contained in:
Bernard Davison
2012-04-01 14:35:21 +10:00
parent 9ea34ed500
commit d1a527b2b1
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -26,7 +26,10 @@ my $upload_output = run_program(
$ENV{'PAPARAZZI_SRC'},
"make $make_upload_options",
0,1);
unlike($upload_output, '/\bError\b/i', "The upload output does not contain the word \"Error\"");
SKIP: {
skip "The requested hardware isn't available on this host.", 1 unless $make_upload_options =~ m#Error: unable to open ftdi device: device not found#;
unlike($upload_output, '/\bError\b/i', "The upload output does not contain the word \"Error\"");
}
# Start the server process
my $server_command = "$ENV{'PAPARAZZI_HOME'}/sw/ground_segment/tmtc/server";
+4 -1
View File
@@ -26,7 +26,10 @@ my $upload_output = run_program(
$ENV{'PAPARAZZI_SRC'},
"make $make_upload_options",
0,1);
unlike($upload_output, '/\bError\b/i', "The upload output does not contain the word \"Error\"");
SKIP: {
skip "The requested hardware isn't available on this host.", 1 unless $make_upload_options =~ m#Error: unable to open ftdi device: device not found#;
unlike($upload_output, '/\bError\b/i', "The upload output does not contain the word \"Error\"");
}
# Start the server process
my $server_command = "$ENV{'PAPARAZZI_HOME'}/sw/ground_segment/tmtc/server";