Permalink
Browse files

[test suite] added --test-limit command line arg

  • Loading branch information...
1 parent 4f0a212 commit 3b7d73b87f21abef746a66abfeb9736258867618 @mrash committed Jul 27, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 test/test-psad.pl
View
@@ -66,6 +66,7 @@
my @tests_to_exclude = ();
my $list_mode = 0;
my $diff_mode = 0;
+my $test_limit = 0;
my $saved_last_results = 0;
my $test_system_install = 0;
my $normal_root_override_str = '';
@@ -103,6 +104,7 @@
'enable-auto-block-tests' => \$enable_auto_block_tests,
'List-mode' => \$list_mode,
'diff' => \$diff_mode,
+ 'test-limit=i' => \$test_limit,
'help' => \$help
);
@@ -977,6 +979,7 @@
### main loop through all of the tests
for my $test_hr (@tests) {
&run_test($test_hr);
+ last if $test_limit > 0 and $executed >= $test_limit;
}
&logr("\n[+] passed/failed/executed: $passed/$failed/$executed tests\n\n");

0 comments on commit 3b7d73b

Please sign in to comment.