mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user