Commit Graph

79 Commits

Author SHA1 Message Date
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
4b4f532417 uitests: Wire up --coverage
Need to launch the external coverage process to actually measure
things
2018-01-09 13:51:53 -05:00
Cole Robinson
044d93d471 tests: Rework how we pass command line objects down to test data 2018-01-08 17:05:55 -05:00
Cole Robinson
89945118df uitests: Make unittest.installHandler work as expected
And ctrl-c exiting in general.
2018-01-08 09:21:42 -05:00
Cole Robinson
cf165241a1 tests: Force verbose mode for UI tests 2018-01-08 09:21:42 -05:00
Cole Robinson
6009044463 tests: Don't always generate coverage data
We were doing this unconditionally, and on my laptop it seems to be
responsible for about 20% of the runtime... whoops!
2018-01-08 09:21:42 -05:00
Cole Robinson
c727db2380 tests: Drop --skipcli option
cli tests are much faster nowadays, this option isn't all that useful
2018-01-06 14:04:34 -05:00
Cole Robinson
c7ed34de63 tests: test_urls: Big rework
Move all the test cases to an .ini file. Various cleanups and
minor improvements throughout
2018-01-06 14:04:34 -05:00
Pavel Hrdina
ec266d3cda setup: introduce --jobs for pylint
Pylint supports configuring jobs to use multiple processes to
speed up Pylint.  Default value is 1.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 11:10:42 +02:00
Chen Hanxiao
c92aade081 pycodestyle: fix all E203 warnings
Fix all E203 whitespace before ':'
   Also remove E203 ignore option of pycodestyle

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-08-11 00:01:38 +08: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
Radostin Stoyanov
2fd6d9aa32 tests: Upgrade pep8 to pycodestyle
The PEP8 [1] project has been renamed to pycodestyle [2].

[1] https://github.com/codeclimate/pep8
[2] https://github.com/pycqa/pycodestyle
2017-08-02 13:23:20 -04:00
Cole Robinson
8d8b353b28 virtinst: Fix bare python3 style print()
We want a newline, so pass it ""
2017-07-10 09:34:22 -04:00
Cole Robinson
ced1d3cadb setup: pylint: use pylint-2 binary if available 2017-06-15 08:11:34 -04:00
Cole Robinson
f551d7e55d Replace file() usage with open()
Same semantics, but the latter is needed for python3
2017-05-05 14:53:12 -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
158a1e0572 setup: test: up verbosity if --debug is passed 2016-07-20 18:15:27 -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
cf3a1cc1f0 appdata: Modernize, and translate it
This also revealed our translations were busted for .desktop files
as well, so rework the POTFILES.in generation to account for it
2016-06-17 18:06:07 -04:00
Cole Robinson
927990ad9d tests: clitest: Allow --only matching on output filename
So you can do "python setup.py --only many-devices' to only run the
clitest compare tests that output their results to files with
"many-devices" in the name
2016-06-11 15:58:48 -04:00
Cole Robinson
f4dfb6de9d Fix recent pylint/pep8 output 2016-04-18 16:42:12 -04:00
Cole Robinson
fe722b99cb setup: Make gsettings always work regardless of install dir (bz #1267377)
Most of this is lifted from 'meld'. The bits are

- compile gsettings schemas at setup.py install time
- add options to disable that, and use them in the RPM
- always pass GSETTINGS_SCHEMA_DIR so gsettings loading always works
  regardless of the install dir

https://bugzilla.redhat.com/show_bug.cgi?id=1267377
2015-11-02 21:02:42 -05:00
Cole Robinson
293a1d1509 setup: Use full distutils import paths
Improves clarity
2015-11-02 17:21:06 -05:00
Cole Robinson
554a39ddae setup: Fix system install on ubuntu
Ubuntu ends up installing in /usr/local, even though system prefix
variable tells us it's /usr. Lots of UI things don't work in /usr/local,
so point it back at /usr.
2015-09-23 19:29:13 -04:00
Cole Robinson
d5d6cfff2c Copy urlgrabber progress bar code into virt-manager.git
This is so we can drop the dep on system python-urlgrabber, which will
block us from going to python3.

All we need is like 300 lines from python-urlgrabber for the progress
bar. In reality our needs are much lower, we don't need the fancy
progress bar that urlgrabber provides, but it's nice to have. So if
keeping a copy of this code causes issues in the future, we can probably
come up with something simpler (or hopefully there's a more common
python progressbar impl that we can use at that point).
2015-09-18 20:55:44 -04:00
Cole Robinson
a51c12660f setup: Do pep8 before pylint
pep8 is super quick, so if there's issue devs can fix those while pylint
is running and gives exhaustive output
2015-09-13 15:07:23 -04:00
Cole Robinson
91e2d502bb tests: Add test_ui target for dogtail UI tests, add an example 2015-09-09 14:26:50 -04:00
Cole Robinson
1237be9d1a virt-install: Clean up created disk images if VM creation fails
We are conservative here, only cleaning up disk images if libvirt
fails to even accept the XML. Otherwise the VM may already be
running or defined, and the user has to do some cleanup anyways.
2015-09-06 14:27:37 -04:00
Cole Robinson
4c361933ea tests: Have the property checker work on whole test suite
Not just xmlparse.py. So we can test a new property via clitest and
not always via xmlparse
2015-04-21 20:15:37 -04:00
Cole Robinson
ef5552d0aa configure: Add --default-hvs, kill --with-bhyve
Takes a comma separated list of HVs, and only shows those as options in
the 'Open Connection' wizard. This option can be used to hide the bhyve
option as well, so drop --with-bhyve
2015-04-06 16:29:28 -04:00
Cole Robinson
6ccbec6b30 setup: Give warning if installing schemas into non-/usr/share (bz 1122537) 2015-04-06 16:03:42 -04:00
Cole Robinson
a773a66a3f virtcli: Export config variables in a class object
Makes things easier to extend later
2015-04-06 15:54:35 -04:00
Cole Robinson
1e2f605e81 virtcli: Drop custom version handling
No one uses it, and it can be handled easy enough with a wrapper script or
similar.
Message-Id: <1b33f161591b86407f78fb307aa4f89f6eee9e4e.1428346382.git.crobinso@redhat.com>
2015-04-06 15:54:35 -04:00
Guido Günther
a41e2c6f5a Add conversion file to migrate GConf values to GSettings
This makes sure we don't lose already configured connections.

Reference: http://bugs.debian.org/740047
2014-09-29 08:56:14 -04:00
Cole Robinson
5aafe008bc Remove virt-image, as scheduled
As promised with the last release, remove virt-image. In 6 months I didn't
hear a peep from any actual users that cared.
2014-09-06 18:05:43 -04:00
Roman Bogorodskiy
613d933d31 setup: drop obsolete virtconv/parsers data_files
Commit 0b4a72f dropped virtconv/parsers/ files, so remove
them from data_files list in setup.py as well.
2014-07-12 16:08:08 -04:00
Roman Bogorodskiy
05df5a6484 Add bhyve support
Allow connection to bhyve using bhyve:///system URI. That is
disabled by default and could be enabled using the new
configure option 'with-bhyve'.
2014-04-11 15:52:31 -04:00
Cole Robinson
a398d245cb Clean up pylint integration
- Drop no longer needed disable= bits
- Use string names for all skipped pylint messages
2014-04-02 19:00:24 -04: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
Martin Kletzander
ab4fd40e96 pylint: Don't use space after 'print'
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Cole Robinson
35d06e668a setup: Add tests --regenerate-output
Static variable is too dangerous (notice I forgot to unset it with a
recent commit)
2014-02-03 15:55:20 -05:00
Cole Robinson
748ff1c4cc virt-xml: Initial commit, basic set of tests 2014-01-25 17:20:29 -05:00
Martin Kletzander
dc0b9bbaaf Rename hide_unsupported_rhel_options to stable_defaults and clean-up its usage
There were multiple problems with the setting and usage of
hide_unsupported_rhel_options.  Due to the fact that the option has
several diferent namings throughout the code, this patch is renaming
it to stable_defaults, which basically says what the option does and
makes it possible to use it without need for more than one negation
(where the old code had up to 4 of them in some places), which also
helps understanding it.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-01-21 17:13:18 +01:00
Chen Hanxiao
2427254ffe set cov as None if python-coverage not installed
If we didn't install python-coverage, we could not
run 'python setup.py test'.
This patch fixes this little bug.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-01-11 13:24:38 -05: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
e93a984377 setup: Store canonical configure defaults in virtcli 2013-10-02 18:50:01 -04: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
Cole Robinson
74a2ab5612 test_urls: Fix --path option 2013-09-26 18:32:50 -04:00
Cole Robinson
ff5b8d29e2 test_urls: Use multiple unittests, not a single big one 2013-09-26 11:49:16 -04:00
Cole Robinson
15eac4de59 tests: Fix and update test_urls 2013-09-25 19:36:15 -04:00