From 460015816b570156d783486153e02f104112befd Mon Sep 17 00:00:00 2001 From: Wolfgang Link Date: Mon, 4 Apr 2016 13:58:32 +0200 Subject: [PATCH] Select test form command It is possible to select the test what should run. synopsis: run_test_zfspoolplugin.pl [ | ] --- test/run_test_zfspoolplugin.pl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/run_test_zfspoolplugin.pl b/test/run_test_zfspoolplugin.pl index 8e43b7b..fc68195 100755 --- a/test/run_test_zfspoolplugin.pl +++ b/test/run_test_zfspoolplugin.pl @@ -27,13 +27,23 @@ my $basesnap = '@__base__'; my $tests = {}; #create zfs suvol for testing - my $pool = undef; my $zpath = undef; my $cfg = undef; my $scfg = undef; my $count = 0; my $testnum = 18; +my $end_test = $testnum; +my $start_test = 1; + +if (@ARGV == 2) { + $end_test = $ARGV[1]; + $start_test = $ARGV[0]; +} elsif (@ARGV == 1) { + $start_test = $ARGV[0]; + $end_test = $ARGV[0]; +} + my $test18 = sub { @@ -2471,7 +2481,7 @@ $cfg = {'ids' => { $zpath = $subvol; -for (my $i = 1; $i <= $testnum; $i++) { +for (my $i = $start_test; $i <= $end_test; $i++) { setup_zfs(); eval {