p2v: Fix slow test so it runs our locally built virt-v2v.

The virt-p2v slow test tested the local virt-p2v.  However it ran
against the installed virt-v2v (and in fact would have failed if
virt-v2v was not installed).

This commit sets the environment up to run the locally built virt-v2v.

This is unfortunately quite a lot more complex than it should be.
There is no simple "set this environment variable" option in
sshd_config.
This commit is contained in:
Richard W.M. Jones
2016-06-18 11:28:16 +01:00
parent 87addfb440
commit c5f12e47e4
3 changed files with 13 additions and 1 deletions

1
.gitignore vendored
View File

@@ -329,6 +329,7 @@ Makefile.in
/p2v/stamp-virt-p2v.pod
/p2v/stamp-virt-p2v-make-disk.pod
/p2v/stamp-virt-p2v-make-kickstart.pod
/p2v/test-virt-p2v-pxe.authorized_keys
/p2v/test-virt-p2v-pxe.id_rsa
/p2v/test-virt-p2v-pxe.id_rsa.pub
/p2v/test-virt-p2v-pxe.img

View File

@@ -41,6 +41,7 @@ CLEANFILES = \
stamp-virt-p2v.pod \
stamp-virt-p2v-make-disk.pod \
stamp-virt-p2v-make-kickstart.pod \
test-virt-p2v-pxe.authorized_keys \
test-virt-p2v-pxe.img \
test-virt-p2v-pxe.vmlinuz \
test-virt-p2v-pxe.initramfs \
@@ -230,6 +231,7 @@ check-slow: stamp-test-virt-p2v-pxe-data-files
$(MAKE) check TESTS="$(SLOW_TESTS)" SLOW=1
stamp-test-virt-p2v-pxe-data-files: \
test-virt-p2v-pxe.authorized_keys \
test-virt-p2v-pxe.img \
test-virt-p2v-pxe.vmlinuz test-virt-p2v-pxe.initramfs \
test-virt-p2v-pxe.sshd_config \
@@ -272,6 +274,12 @@ test-virt-p2v-pxe.sshd_config: test-virt-p2v-pxe.sshd_config.in
chmod 0444 $@-t
mv $@-t $@
test-virt-p2v-pxe.authorized_keys: test-virt-p2v-pxe.id_rsa.pub $(top_builddir)/run
rm -f $@ $@-t
$(top_builddir)/run sh -c 'echo -n environment=\"PATH=$$PATH\"\ ' > $@-t
cat $< >> $@-t
mv $@-t $@
test-virt-p2v-pxe.ssh_host_rsa_key test-virt-p2v-pxe.ssh_host_rsa_key.pub: stamp-test-virt-p2v-pxe-hostkey
stamp-test-virt-p2v-pxe-hostkey:

View File

@@ -34,7 +34,10 @@ UsePrivilegeSeparation no
PidFile __abs_builddir__/test-virt-p2v-pxe.sshd.pid
HostKey __abs_builddir__/test-virt-p2v-pxe.ssh_host_rsa_key
AuthorizedKeysFile __abs_builddir__/test-virt-p2v-pxe.id_rsa.pub
AuthorizedKeysFile __abs_builddir__/test-virt-p2v-pxe.authorized_keys
# Don't check file permissions.
StrictModes no
# Allow the environment to be set in the authorized_keys file above.
PermitUserEnvironment yes