We don't have to always extract all files from the OVA archive. The OVA,
as defined in the standard, is plain tar. We can work directly over the
tar archive if we use correct 'offset' and 'size' options when defining
the backing file for QEMU. This puts much lower requirement on available
disk space.
Since the virt-v2v behaviour for OVA input now depends on QEMU version
available this affects some of the tests. Expected result of the
affected also has to depend on the QEMU used thus such tests will have
two *.expected files.
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
Run the following command over the source:
perl -pi.bak -e 's/(20[01][0-9])-2016/$1-2017/g' `git ls-files`
(Thanks Rich for the perl snippet, as used in past years.)
Unfortunately I was unable to build s390 binaries since multilib was
dropped in Fedora 24 on s390x. Going from the source of the 'file'
command it seems as if it prints "32-bit" (the architecture is really
31 bit).
The OVF standard allows the use of SHA256 hashes in the manifest file.
Adding support for this.
One of the tests was updated to put SHA256 into manifest file.
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
By adding common CLEANFILES and DISTCLEANFILES variables to
common-rules.mk, we can remove these from most other Makefiles, and
also clean files more consistently.
Note that bin_PROGRAMS are already cleaned by 'make clean', so I
removed cases where these were unnecessarily added to CLEANFILES.
When possible, make the disk image format explicit when invoking tools
or using add-drive. This avoids warnings from qemu about the unspecified
format for the image, and also makes qemu slightly faster (skipping the
disk image probing).
Tests checking the image probing are not touched.
This changes also:
- old-style invocations of tools (`$tool $filename`) into new style
(`$tool -a $filename`)
- add-drive-ro/add-drive-with-if guestfish commands into add/add-drive
with explicit readonly/iface arguments
There should be no change in the tests results.
Look for /lib/os-release in the /usr partition and try to use it, if
present, before using lsb-release later on. This should not change the
final result of the inspection, while using the os-release detection
method also for CoreOS.
Update the phony CoreOS image to use os-release instead, uploading the
version found in the current stable version.
Those will be useful when making decisions about what configuration to
set on output.
The data is also included in --print-source so the tests are adjusted
accordingly.
Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: "Richard W.M. Jones" <rjones@redhat.com>
sha1sum(1) does not exist everywhere, so wrap it in an own function so
the right implementation can be chosen on each OS. Also, wrapping it
avoid using awk everytime.
Move it to the test-data directory, giving it a more generic name so it
can be used also for more than just md5; adjust qemu tests accordingly.
This is just code motion, no behaviour change.
We want to test if virt-v2v can find drivers using the *.inf files.
For this to work, one field is important:
[Version]
DriverVer = 07/17/2013,6.1.0.10018
Copy the [Version] section header and DriverVer field from the real
*.inf files to our fake *.inf files, which is enough for testing.
See also:
https://www.redhat.com/archives/libguestfs/2015-October/msg00352.html
Note that the fields are case insensitive and may or may not contain
spaces.
The virtio-win ISO has a different layout and superset of drivers
compared to the virtio-win RPM directory. Previously we simply put
all the RPM files into the fake ISO. Instead create a fake ISO which
has the same layout and (fake) drivers as the real ISO.
Remove man pages and other pages which 'make clean' did not remove
before.
To evaluate which pages could be removed, I did a full build and
check, and then ran 'make clean' followed by 'git clean -xdf'. By
examining the output of the git clean command I could see which files
were being missed.
Files that are _not_ removed by make clean or make distclean:
- generator-built files
- Makefile, Makefile.in, .deps, .depend
- any ./configure output files (maybe they should be?)
When I conceived commit dc1d0880b0, I
thought it would be a good idea to build test-data files, including
the phony guest images, during the 'make' phase. Previously these
were built early in the 'make check' phase.
However this has two disadvantages: (a) We run the appliance
unnecessarily during builds. For example, it is not necessary to
build the phony guests if we are going to do an 'installcheck'.
(b) Even if we are testing, the critical first time we run the
appliance is not in 'quickcheck' or 'tests/qemu', but some random
guest build.
Reorder the build sequence to fix this, and also a few other things.
This updates commit dc1d0880b0.
Create a new top-level directory called test-data, which will carry
all the test data which is large and/or shared between multiple tests.
There are actually several new subdirectories created:
test-data/binaries: The pre-built binary and library files for random
architectures that we use to test various architecture detection
features (was part of tests/data).
test-data/blank-disks: The blank disks which are used for disk format
detection (was part of tests/data).
test-data/files: Other miscellaneous test files from tests/data that
are not included in the above.
test-data/phony-guests: The phony guests (was tests/guests).
test-data: The top-level directory builds the 'test.iso' image file
that is used for testing the C API and in miscellaneous other tests.