[test suite] added 'make test' check for FKO perl module
All built-in tests in the FKO module must pass for this new test to pass. This commit is in support of #103
This commit is contained in:
parent
e8fe29bbe1
commit
c271f01d00
@ -1716,6 +1716,33 @@ sub perl_fko_module_compile_install() {
|
|||||||
return $rv;
|
return $rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub perl_fko_module_make_test() {
|
||||||
|
my $test_hr = shift;
|
||||||
|
|
||||||
|
my $rv = 1;
|
||||||
|
|
||||||
|
my $curr_pwd = cwd() or die $!;
|
||||||
|
|
||||||
|
chdir '../perl/FKO' or die $!;
|
||||||
|
|
||||||
|
&run_cmd("make test", $cmd_out_tmp, "../../test/$curr_test_file");
|
||||||
|
|
||||||
|
chdir $curr_pwd or die $!;
|
||||||
|
|
||||||
|
if ($test_hr->{'positive_output_matches'}) {
|
||||||
|
unless (&file_find_regex(
|
||||||
|
$test_hr->{'positive_output_matches'},
|
||||||
|
$MATCH_ALL, $APPEND_RESULTS, $curr_test_file)) {
|
||||||
|
&write_test_file(
|
||||||
|
"[-] positive_output_matches not met, setting rv=0\n",
|
||||||
|
$curr_test_file);
|
||||||
|
$rv = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $rv;
|
||||||
|
}
|
||||||
|
|
||||||
sub perl_fko_module_new_object() {
|
sub perl_fko_module_new_object() {
|
||||||
my $test_hr = shift;
|
my $test_hr = shift;
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,15 @@
|
|||||||
'function' => \&perl_fko_module_compile_install,
|
'function' => \&perl_fko_module_compile_install,
|
||||||
'fatal' => $NO
|
'fatal' => $NO
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'category' => 'perl FKO module',
|
||||||
|
'subcategory' => 'make test',
|
||||||
|
'detail' => 'run built-in tests',
|
||||||
|
'function' => \&perl_fko_module_make_test,
|
||||||
|
'positive_output_matches' => [qr/All\stests\ssuccessful/i],
|
||||||
|
'fatal' => $NO
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
'category' => 'perl FKO module',
|
'category' => 'perl FKO module',
|
||||||
'subcategory' => 'FUZZING',
|
'subcategory' => 'FUZZING',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user