Commit Graph

33 Commits

Author SHA1 Message Date
Cole Robinson 78c8aef75e tests: Move all data directories to data/
This cleans up the file hierarchy a bit

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-27 06:57:37 -05:00
Cole Robinson b746d919a9 virt-install: Add --install kernel_args=X,kernel_args_overwrite=yes|no
--install kernel_args=X acts like --extra-args. If
kernel_args_overwrite=yes is also specified, it overwrites whatever
default kernel args we would have used for the install method.
2019-06-13 14:00:04 -04:00
Cole Robinson d252061b4b tests: inject: Update test cases 2019-04-03 20:23:55 -04:00
Cole Robinson e127d5e269 tests: inject: use qemu system, not session
system will give us vol upload coverage
2018-10-14 19:06:06 -04:00
Cole Robinson 9be5fec593 tests: inject: fix some pylint 2018-10-13 17:54:07 -04:00
Cole Robinson f102d2a256 tests: inject: use virt-install, not direct API
Simplifies the code and gives us actual command line coverage,
but requires a small hack to work correctly for modern
centos/fedora test cases, inst.repo from --location takes
precedence over our kickstart URL
2018-10-13 16:31:04 -04:00
Cole Robinson fcfc1df35e tests: initrdinject: Add a debian test case 2018-10-09 15:41:43 -04:00
Cole Robinson 71626b1dd2 initrdinject: Remove RHEL4 support
It's end of life, let's move on
2018-10-09 14:18:36 -04:00
Daniel P. Berrangé 48e32b429d Fix copyright header to specify GPLv2 or later, not GPLv2 only.
The copyright headers in every file were chjanged in this previous commit

  commit b6dcee8eb7
  Author: Cole Robinson <crobinso@redhat.com>
  Date:   Tue Mar 20 15:00:02 2018 -0400

    Use consistent and minimal license header for every file

Where before this they said "

  "either version 2 of the License, or (at your option) any later version."

Now they just say

  "GNU GPLv2"

This fixes it to say "GNU GPLv2 or later" again.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-04 16:51:37 -04:00
Cole Robinson b9e72b8609 urldetect: Move treeinfo media checking into Treeinfo class
Rather than in the base Distro class. Simplifies things a bit
2018-03-29 16:23:57 -04:00
Cole Robinson a8522032eb virtinst: Split out urldetect.py from urlfetcher.py
urldetect.py has all the distro metadata and parsing logic,
urlfetcher.py has the http/ftp/iso/etc. fetching logic
2018-03-28 18:46:07 -04:00
Cole Robinson b6dcee8eb7 Use consistent and minimal license header for every file 2018-03-21 07:29:40 -04:00
Cole Robinson 6954c6774a tests: Fix running testsuite on older libvirt
If we try to run the testsuite on anything older than libvirt 3.1,
it immediately throws an exception before processing any tests,
due to choking on parsing drm bits from testdriver.xml. This global
failure is only due to sloppy coding though.

Turn all test cases that use testdriver.xml into skips in this case,
so we can at least get some test coverage otherwise.
2018-02-22 16:01:24 -05:00
Cole Robinson 8e7b5ed2d8 Drop __future__ imports, no longer needed 2018-02-08 14:08:23 -05:00
Cole Robinson ddba9c1702 Switch to python3 in script shebang
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2018-02-06 18:56:15 -05:00
Cole Robinson bcdf7c8922 tests: inject: Fix some pylint 2018-01-27 16:27:41 -05:00
Cole Robinson e9b4d35dd0 tests: inject: Small updates
Fix output, better debugging, update URL list
2018-01-27 15:28:19 -05:00
Radostin Stoyanov b93cc3bbc9 pycodestyle: Do not use bare 'except:'
A bare 'except:' catches all exceptions [1], including SystemExit,
KeyboardInterrupt, and GeneratorExit (which is not an error and should
not normally be caught by user code). In situations where you need to
catch all “normal” errors, you can catch the base class for all normal
exceptions, Exception [2].

[1] https://docs.python.org/2/howto/doanddont.html#except
[2] https://docs.python.org/2/library/exceptions.html#Exception
2017-08-02 13:57:43 -04:00
Cole Robinson 1c22105a54 tests: inject: Update URL list 2017-06-07 12:40:46 -04:00
Cole Robinson 55288c4551 Convert to python3 style print() syntax
Use __future__ imports to keep this working for python2
2017-05-05 14:52:37 -04:00
Cole Robinson 62feeb02a8 Switch to python3 style 'except X as Y' notation
Which also works with python2.7
2017-05-05 14:52:11 -04:00
Cole Robinson df5c688c11 tests_inject: Update to use standard --only option
Rather than custom --distro option. And fix the URL list
2016-06-17 18:41:50 -04:00
Cole Robinson 118bf85cba Apparently -tt doesn't work with #!/usr/bin/env ... 2016-06-17 16:38:57 -04:00
Cole Robinson 47dd38eb3e Use #!/usr/bin/env for python scripts
This is recommended for upstream, but not for downstream, like Fedora.
So change /usr/bin/env to /usr/bin/python2 at RPM install time to
match the ideal Fedora config.

https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython
https://bugzilla.redhat.com/show_bug.cgi?id=1303282
2016-06-17 12:56:14 -04:00
Cole Robinson dbb057d095 virtinst: Move initrdinject handling to its own file 2016-06-17 07:52:42 -04:00
Cole Robinson 697164f2e5 virtinst: Centralize urlgrabber meter lookup
We will eventually want to drop this dep since it's basically dead
upstream, this is a small step in that direction
2015-09-06 15:09:44 -04:00
Cole Robinson e7666390ff test_inject: Add Fedora 22 URL 2015-03-26 19:37:17 -04:00
Cole Robinson 1bfdf0575f test_inject: Drop old bits, add f21 and rhel7, reorg a bit 2014-09-20 15:58:52 -04:00
Cole Robinson 20b103d910 tests: test_inject: Minor fixups 2014-02-14 11:35:29 -05:00
Martin Kletzander 4196f4287b Use proper python version
since we work with python2 only, mentioning it in all shebangs make
the commands from git work even when python3 is set as default.

This also fixes one test where command being ran is 'virt-xml' through
subprocess.Popen().

While at that, add '-tt' where possible in order to make everyone use
same indentation characters.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Giuseppe Scrivano 499cb63f65 doc: remove reference to SDL from virt-install man page
Adjust some tests to not use --graphics sdl.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-06 16:20:12 +01:00
Giuseppe Scrivano 0df75c7603 headers: update "Red Hat, Inc." copyright for the year 2013
Ensure that any file touched by a @redhat.com author in 2013 has an
updated copyright header.

The files were updated using the build-aux/update-copyright gnulib
script and manually added where the copyright line wasn't present.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:26 +01:00
Cole Robinson 4f59c24b40 tests: Add test_initrd_inject command
This is a standalone test like test_urls, and requires interraction. It
pulls down a bunch of kernels from public URL trees, inject known
kickstarts that induce quick failure. User inspects the output to
ensure initrd inject is working as expected.
2013-09-28 16:50:08 -04:00