]> git.proxmox.com Git - pve-ha-manager.git/commitdiff
add option --nodiff
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 3 Dec 2014 06:18:31 +0000 (07:18 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 3 Dec 2014 06:18:31 +0000 (07:18 +0100)
test/ha-tester.pl

index 3d3a1fde7d448726294a75906857a9583ebca38a..6eae43f8e47c8362dc52102e814dad1594cb804d 100755 (executable)
@@ -2,10 +2,21 @@
 
 use strict;
 use warnings;
+use Getopt::Long;
+
 use File::Path qw(make_path remove_tree);
 
 use PVE::Tools;
 
+
+my $opt_nodiff;
+
+if (!GetOptions ("nodiff"   => \$opt_nodiff)) {
+    print "usage: $0 testdir [--nodiff]\n";
+    exit -1;
+}
+
+
 #my $testcmd = "../pve-ha-manager --test"
 
 sub run_test {
@@ -31,6 +42,8 @@ sub run_test {
     my $res = system("../pve-ha-manager --test '$dir'|tee $logfile");
     die "Test '$dir' failed\n" if $res != 0;
 
+    return if $opt_nodiff;
+
     if (-f $logexpect) {
        my $cmd = ['diff', '-u', $logexpect, $logfile]; 
        $res = system(@$cmd);