Skip to content

Commit 69f54ca

Browse files
Merge pull request diffblue#3571 from thomasspriggs/tas/test_name
Add `-f` option to `test.pl` to forward the test description
2 parents 51fda76 + 9b65b1a commit 69f54ca

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

regression/test.pl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ ($$$$$$$$$$)
121121
$output .= "-";
122122
$output .= $output_suffix;
123123
}
124+
if(our $opt_f) {
125+
substr($options, 0, 0) = "$output "
126+
}
124127
$output .= ".out";
125128

126129
if($output eq $input) {
@@ -279,6 +282,7 @@ ($$$$)
279282
testing of the same desc file with different commands or options,
280283
as runs with different suffixes will operate independently and keep
281284
independent logs.
285+
-f forward the test name to CMD
282286
283287
test.pl expects a test.desc file in each subdirectory. The file test.desc
284288
follows the format specified below. Any line starting with // will be ignored.
@@ -313,9 +317,9 @@ ($$$$)
313317
use Getopt::Long qw(:config pass_through bundling);
314318
$main::VERSION = 0.1;
315319
$Getopt::Std::STANDARD_HELP_VERSION = 1;
316-
our ($opt_c, $opt_i, $opt_j, $opt_n, $opt_p, $opt_h, $opt_C, $opt_T, $opt_F, $opt_K, $opt_s, %defines, @include_tags, @exclude_tags); # the variables for getopt
320+
our ($opt_c, $opt_f, $opt_i, $opt_j, $opt_n, $opt_p, $opt_h, $opt_C, $opt_T, $opt_F, $opt_K, $opt_s, %defines, @include_tags, @exclude_tags); # the variables for getopt
317321
GetOptions("D=s" => \%defines, "X=s" => \@exclude_tags, "I=s" => \@include_tags);
318-
getopts('c:i:j:nphCTFKs:') or &main::HELP_MESSAGE(\*STDOUT, "", $main::VERSION, "");
322+
getopts('c:f:i:j:nphCTFKs') or &main::HELP_MESSAGE(\*STDOUT, "", $main::VERSION, "");
319323
$opt_c or &main::HELP_MESSAGE(\*STDOUT, "", $main::VERSION, "");
320324
$opt_j = $opt_j || $ENV{'TESTPL_JOBS'} || 0;
321325
if($opt_j && $opt_j != 1 && !$has_thread_pool) {

0 commit comments

Comments
 (0)