From ec89d2ec6127219fda7e763f52440bc04a80307b Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Tue, 29 Sep 2015 11:26:07 +0200 Subject: [PATCH] [tesh] Fix arguments in tesh file Example: $ tesh with_mutex_handling.tesh --cfg=model-check/reduction:none Test suite from stdin - remove the options from the tesh @ARGV before handling the .tesh file; - GetOptions() can't modify the locally-scoped (my) @ARGV, use the global one instead. --- tools/tesh/tesh.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/tesh/tesh.pl b/tools/tesh/tesh.pl index 47061abfde..3c7c380be1 100755 --- a/tools/tesh/tesh.pl +++ b/tools/tesh/tesh.pl @@ -137,10 +137,6 @@ if ( $ARGV[0] eq "--internal-killer-process" ) { sub get_options { - # remove the tesh file from the ARGV used - my @ARGV = @_; - $tesh_file = pop @ARGV; - # temporary arrays for GetOption my @cfg; my $log; # ignored @@ -167,6 +163,8 @@ sub get_options { 'enable-coverage+' => \$enable_coverage, ); + $tesh_file = pop @ARGV; + if ($enable_coverage) { print "Enable coverage\n"; } @@ -192,7 +190,7 @@ sub get_options { return %opt; } -my %opts = get_options(@ARGV); +my %opts = get_options(); ## ## File parsing -- 2.20.1