15 Commits

Author SHA1 Message Date
Pino Toscano
64bb9edd52 tests: specify the image format when possible
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.
2016-05-19 19:06:00 +02:00
Pino Toscano
d2e81b42e7 inspect: use os-release for CoreOS
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.
2016-03-31 11:38:00 +02:00
Roman Kagan
ad5bb4f6bd v2v: collect source network and video adapter types
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>
2016-03-24 15:07:01 +03:00
Pino Toscano
8aee5726d3 v2v: tests: isolate SHA1 calculation in an own shared function
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.
2016-03-22 09:45:41 +01:00
Pino Toscano
41795a1c98 tests: move guestfs-md5.sh to test-data
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.
2016-03-22 09:45:41 +01:00
Richard W.M. Jones
307c83177c Update copyright dates for 2016.
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2015/$1-2016/g' `git ls-files`
2016-01-02 21:19:51 +00:00
Richard W.M. Jones
c5237e28c5 test-data: Copy DriverVer from real *.inf files to fake *.inf files.
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.
2015-11-05 16:23:10 +00:00
Richard W.M. Jones
8c735a84c7 test-data: Make fake virtio-win ISO.
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.
2015-11-05 16:23:10 +00:00
Richard W.M. Jones
b99a57a631 test-data: Add further (all fake) virtio-win driver files. 2015-11-05 16:23:10 +00:00
Richard W.M. Jones
f933a3c9c7 v2v: Move fake-virtio-win and fake-virt-tools under test-data.
There is no change, this just moves the test files.
2015-11-05 16:23:10 +00:00
Richard W.M. Jones
8a72616bf7 test-data: phony-guests: Don't use *.tmp.* temporary files. 2015-11-05 13:46:05 +00:00
Richard W.M. Jones
a2edda266e build: Make 'make clean' remove more files.
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?)
2015-11-03 13:53:37 +00:00
Richard W.M. Jones
877c69bef7 build: Reorder build sequence.
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.
2015-10-30 22:06:18 +00:00
Richard W.M. Jones
dd5f5ffb48 test-data: Remove bogus comment.
The way we now build the blank guest images is safe to be run in
parallel.
2015-10-30 21:39:54 +00:00
Richard W.M. Jones
dc1d0880b0 tests: Move the tests/data and tests/guests directories to test-data.
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.
2015-10-30 16:07:32 +00:00