[pve-devel] [PATCH 1/3] Select test form command

Wolfgang Link w.link at proxmox.com
Mon Apr 4 13:58:32 CEST 2016


It is possible to select the test what should run.
synopsis: run_test_zfspoolplugin.pl [<test_num> | <start_test_num> <end_test_num>]
---
 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 {
-- 
2.1.4




More information about the pve-devel mailing list