These are more small bits to make p2v more independent, and they will
help after the split.
Pino Toscano (4):
p2v: clean also the test images
p2v: consider p2v-config.h as generated source
p2v: fix tests with srcdir!=builddir
p2v: split appliance tests in own variable
p2v/Makefile.am | 13 +++++++++----
p2v/test-virt-p2v-docs.sh | 2 +-
p2v/test-virt-p2v-nbdkit.sh | 4 ++--
p2v/test-virt-p2v.sh | 4 ++--
4 files changed, 14 insertions(+), 9 deletions(-)
--
2.21.0
Show replies by date
Followup of commit ea4d9bd1574d32cfb9d1241f911fcab5a4ccc624, and
commit f02c0cb552e0cf3a82a9447791db4c430426d569.
---
p2v/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/p2v/Makefile.am b/p2v/Makefile.am
index 1545490d2..741f4d50d 100644
--- a/p2v/Makefile.am
+++ b/p2v/Makefile.am
@@ -57,6 +57,7 @@ EXTRA_DIST = \
CLEANFILES += \
$(dependencies_files) \
$(generated_sources) \
+ $(PHYSICAL_MACHINE) $(BLANK_DISK) \
about-authors.c \
stamp-test-virt-p2v-pxe-data-files \
stamp-test-virt-p2v-pxe-kernel \
--
2.21.0
While it is generated at configure time for dependency reasons, consider
it a generated source nevertheless: after the first run, there will be
dependency rules available, so automake will trigger the proper rule to
generate it again using generate-p2v-config.pl.
---
p2v/Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/p2v/Makefile.am b/p2v/Makefile.am
index 741f4d50d..e0b194c29 100644
--- a/p2v/Makefile.am
+++ b/p2v/Makefile.am
@@ -108,7 +108,8 @@ virt_p2v_SOURCES = \
generated_sources = \
config.c \
- kernel-config.c
+ kernel-config.c \
+ p2v-config.h
nodist_virt_p2v_SOURCES = \
$(generated_sources) \
--
2.21.0
Point to files in the source directory using the right variables, so
they are found also when the build directory is different than the
source directory.
---
p2v/test-virt-p2v-docs.sh | 2 +-
p2v/test-virt-p2v-nbdkit.sh | 4 ++--
p2v/test-virt-p2v.sh | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/p2v/test-virt-p2v-docs.sh b/p2v/test-virt-p2v-docs.sh
index 5ef3c7f4e..d4942de4e 100755
--- a/p2v/test-virt-p2v-docs.sh
+++ b/p2v/test-virt-p2v-docs.sh
@@ -21,4 +21,4 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl virt-p2v.pod virt-p2v
+$top_srcdir/podcheck.pl $srcdir/virt-p2v.pod virt-p2v
diff --git a/p2v/test-virt-p2v-nbdkit.sh b/p2v/test-virt-p2v-nbdkit.sh
index 5c635bb03..cf7a416bc 100755
--- a/p2v/test-virt-p2v-nbdkit.sh
+++ b/p2v/test-virt-p2v-nbdkit.sh
@@ -37,8 +37,8 @@ mkdir $d
# We don't want the program under test to run real 'ssh' or 'scp'.
# They won't work. Therefore create dummy 'ssh' and 'scp' binaries.
pushd $d
-ln -sf ../test-virt-p2v-ssh.sh ssh
-ln -sf ../test-virt-p2v-scp.sh scp
+ln -sf "$abs_srcdir/test-virt-p2v-ssh.sh" ssh
+ln -sf "$abs_srcdir/test-virt-p2v-scp.sh" scp
popd
export PATH=$d:$PATH
diff --git a/p2v/test-virt-p2v.sh b/p2v/test-virt-p2v.sh
index 121bf12eb..a6b07274e 100755
--- a/p2v/test-virt-p2v.sh
+++ b/p2v/test-virt-p2v.sh
@@ -36,8 +36,8 @@ mkdir $d
# We don't want the program under test to run real 'ssh' or 'scp'.
# They won't work. Therefore create dummy 'ssh' and 'scp' binaries.
pushd $d
-ln -sf ../test-virt-p2v-ssh.sh ssh
-ln -sf ../test-virt-p2v-scp.sh scp
+ln -sf "$abs_srcdir/test-virt-p2v-ssh.sh" ssh
+ln -sf "$abs_srcdir/test-virt-p2v-scp.sh" scp
popd
export PATH=$d:$PATH
--
2.21.0
This way they can be properly shipped also when creating a distribution
tarball ('make dist') from a build configured with --disable-appliance.
---
p2v/Makefile.am | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/p2v/Makefile.am b/p2v/Makefile.am
index e0b194c29..4e2405e9d 100644
--- a/p2v/Makefile.am
+++ b/p2v/Makefile.am
@@ -25,7 +25,7 @@ BUILT_SOURCES = \
EXTRA_DIST = \
$(BUILT_SOURCES) \
- $(TESTS) $(SLOW_TESTS) \
+ $(TESTS) $(APPLIANCE_TESTS) $(SLOW_TESTS) \
contrib/aux-scripts/do-build.sh \
contrib/build-p2v-iso.sh \
contrib/patches/0001-RHEL-5-ONLY-DISABLE-AUTOMATIC-REMOTE-PORT-ALLOCATION.patch \
@@ -288,10 +288,13 @@ TESTS = \
test-virt-p2v-cmdline.sh \
test-virt-p2v-docs.sh
+APPLIANCE_TESTS = \
+ test-virt-p2v.sh \
+ test-virt-p2v-nbdkit.sh
+
if ENABLE_APPLIANCE
TESTS += \
- test-virt-p2v.sh \
- test-virt-p2v-nbdkit.sh \
+ $(APPLIANCE_TESTS) \
$(SLOW_TESTS)
endif ENABLE_APPLIANCE
--
2.21.0