Blob Blame History Raw
From f5ce5692f4701fc122af82759a790cfe01a18c35 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 12 Apr 2017 08:32:58 +0100
Subject: [PATCH] v2v: tests: Fix -i vmx test so it is more stable.

When running under valgrind, the process takes a fraction of a second
to start up, changing the "Opening the guest" timestamp, which broke
the test.

Fixes commit ca40078cdda9167d4658ddfe24c828c7ee76be37.

(cherry picked from commit ec61873d397f050fe28987f10ec919778d27818a)
---
 v2v/test-v2v-i-vmx-1.expected | 2 +-
 v2v/test-v2v-i-vmx-2.expected | 2 +-
 v2v/test-v2v-i-vmx-3.expected | 2 +-
 v2v/test-v2v-i-vmx-4.expected | 2 +-
 v2v/test-v2v-i-vmx.sh         | 1 +
 5 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/v2v/test-v2v-i-vmx-1.expected b/v2v/test-v2v-i-vmx-1.expected
index c7ef1f5d5..128c34762 100644
--- a/v2v/test-v2v-i-vmx-1.expected
+++ b/v2v/test-v2v-i-vmx-1.expected
@@ -1,4 +1,4 @@
-[   0.0] Opening the source -i vmx test-v2v-i-vmx-1.vmx
+
 Source guest information (--print-source option):
 
     source name: BZ1308535_21disks
diff --git a/v2v/test-v2v-i-vmx-2.expected b/v2v/test-v2v-i-vmx-2.expected
index a04bd0f62..7f3ee8154 100644
--- a/v2v/test-v2v-i-vmx-2.expected
+++ b/v2v/test-v2v-i-vmx-2.expected
@@ -1,4 +1,4 @@
-[   0.0] Opening the source -i vmx test-v2v-i-vmx-2.vmx
+
 Source guest information (--print-source option):
 
     source name: Fedora 20
diff --git a/v2v/test-v2v-i-vmx-3.expected b/v2v/test-v2v-i-vmx-3.expected
index 64808a77b..4664efdec 100644
--- a/v2v/test-v2v-i-vmx-3.expected
+++ b/v2v/test-v2v-i-vmx-3.expected
@@ -1,4 +1,4 @@
-[   0.0] Opening the source -i vmx test-v2v-i-vmx-3.vmx
+
 Source guest information (--print-source option):
 
     source name: RHEL 7.1 UEFI
diff --git a/v2v/test-v2v-i-vmx-4.expected b/v2v/test-v2v-i-vmx-4.expected
index 208920b29..d6dcda5b6 100644
--- a/v2v/test-v2v-i-vmx-4.expected
+++ b/v2v/test-v2v-i-vmx-4.expected
@@ -1,4 +1,4 @@
-[   0.0] Opening the source -i vmx test-v2v-i-vmx-4.vmx
+
 Source guest information (--print-source option):
 
     source name: Windows 7 x64
diff --git a/v2v/test-v2v-i-vmx.sh b/v2v/test-v2v-i-vmx.sh
index 5353e7e2a..997103d41 100755
--- a/v2v/test-v2v-i-vmx.sh
+++ b/v2v/test-v2v-i-vmx.sh
@@ -37,6 +37,7 @@ for i in 1 2 3 4; do
     # Normalize the print-source output.
     mv test-v2v-i-vmx-$i.actual test-v2v-i-vmx-$i.actual.old
     sed \
+        -e "s,.*Opening the source.*,," \
         -e "s,$(pwd),," \
         < test-v2v-i-vmx-$i.actual.old > test-v2v-i-vmx-$i.actual
     rm test-v2v-i-vmx-$i.actual.old
-- 
2.14.3