Commit Graph

18 Commits

Author SHA1 Message Date
Matthew Treinish fca99f945c Fix compatibility with latest oslo.config
With recent versions of oslo.config the tests have started to fail
because the multistring opt used for specifying input subunit file paths
was getting an implicit required. However it's not a required field just
positional. This commit fixes this issue by explicitly setting it to not
be requried and setting a default value of None for it. I'm not sure when
an implicit required was added in oslo.config, but this should fix it
regardless of which oslo.config version is used.

Fixing other gate failure also for pythin 2.7 & 3.8 compatibility.

- with mysql 8.0 there is no implicit user creation with GRANT. we
need to create user first.

- hacking version used is too old which pull old pyflakes (< 2.1.0) not
compatible with py3.8. Bumping hacking version to 2.0.0 which solve the
pyflakes version conflict with new pip resolver but skipping all the
new checks of 2.0.0. We can fix those later once gate is green.

- for openstack-tox-py27 we need to cap stestr with <3.0.0 so that it can pull
stestr py2 compatible version.

- move dec requirements seprate from test-requirements otherwise it conflist with
other deps.

Story: 2008348
Task: 41250

Change-Id: I219755d98d9f8b5a284c0e858b60f852b948c8d4
2021-01-21 19:43:39 -06:00
Masayuki Igawa 99f770ca13
Fix gate error "mysqladmin: command not found" and etc
mysqladmin package is required in tools/test-setup.sh
so adding bindep.txt file for this binary dependencies. And postgresql
packages are also required as well.

- http://lists.openstack.org/pipermail/openstack-discuss/2019-June/007272.html

This commit also updated sphinx versions in test-requirements.txt to
avoid this error.

  ERROR: Sphinx requires Python '>=3.5' but the running Python is 2.7.15

And also, this commit fixes a sqlalchemy error. This probably caused by
sqlalchemy version updates. It might be better to fix the code rather
than the sqlalchemy version cap.

  sqlalchemy.exc.ArgumentError: Textual SQL expression
    "tests.id='fake_null_test_..." should be explicitly declared as
    text("tests.id='fake_null_test_...")

Change-Id: Iff79081403fbc26442165ff5feb300bc317b0dfc
2019-07-18 12:11:53 +09:00
Vieri 02c0c6354d Update min tox version to 2.0
The commands used by constraints need at least tox 2.0.  Update to
reflect reality, which should help with local running of constraints
targets.

Change-Id: I9af1121a4a7b7f1db8bcae5a9f0f9a643e4b2428
2018-11-02 12:06:10 +00:00
qingszhao 1c6037c9a3 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: Ifa267fcd8eb5334672dd0b603d42dedb67bd2c98
2018-06-12 01:20:47 +08:00
Matthew Treinish ea8194464d Update python3 versions in tox.ini envlist
This updates the envlist to include modern versions of python. It
doesn't really mean anything except for you run tox without specifying
an environment it will now run py35 and py36 instead of py34 (which
isn't used anywhere anymore)

Change-Id: I5b61677d4ee7a2c5dbf29755c03243cba0e6446e
2017-10-25 07:53:41 +00:00
Matthew Treinish b99350137b Switch to using stestr
stestr is a fork of testrepository, designed specifically to concentrate
on being a dedicated test runner. [1] The testrepository project is
basically not active anymore and has several long standing bugs and
useablility issues. stestr is still actively maintained and fixes a
large number of those issues with testrepository. The best part is that
stestr supports using subunit2sql as a repository backend.

[1] https://github.com/mtreinish/stestr

Change-Id: I39f5db8f77de027c18917215c761dca69d8cbea0
2017-09-06 17:58:04 +00:00
Rajiv Kumar 86a84dd2fe H402 hacking have been deprecated
H402 hacking have been removed since hacking 0.10.
https://github.com/openstack-dev/hacking/blob/master/setup.cfg.
So removed H402 ignore statement.

Change-Id: Ifcbe0ee9b5f25d88ff1eed8b884ca362e3f0a7e0
2017-01-09 08:35:27 +05:30
Masayuki Igawa 2fd8b9f6df Add command deleting *.pyc before executing ostestr
This commit adds a command for deleting *.pyc before executing ostestr
with tox. This patch would help that removing unnecessary *.pyc files
when we rename, move or remove *.py ones.

Change-Id: I5fcce2e50cb7af9206175f340dad151e3eee6a9c
2016-01-08 16:52:21 +09:00
Matthew Treinish 9b0e9d2068
Add reno release notes to subunit2sql
This commit adds support for using reno to generate the subunit2sql
release notes. This will make it much easier to keep up-to-date
and accurate release notes. Also doing it in tree will make the
notes reviewable which will help with that too.

Change-Id: I75502185a666945721dd84e4710e798962e612ee
2015-11-20 18:59:18 -05:00
Matthew Treinish fa82de131c
Enable python 3 testing support
In an effort to being really supporting using subunit2sql in a python3
environment this patch fixes all the issues with python3
incompatibility that show up when running tests. However, because the
test coverage is limited for certain parts there are still probably
pieces which don't work with python 3.

Change-Id: I160d1675069836fa514547c31866b22bcaf29dcb
2015-10-05 17:52:29 -04:00
Matthew Treinish 40b4899551
Use ostestr for running unit tests
This commit switches the test runner to be ostest in the tox.init.
This will ensure that the output formatting of subunit2sql is inline
with other projects.

Change-Id: I4fc0eeb6678c1fa6e2625bf8f81eef0faf77d3a7
2015-09-23 22:32:07 -04:00
Jenkins 59f23024f1 Merge "Add migration to populate run_time where needed" 2014-10-07 21:27:38 +00:00
Matthew Treinish 7948c0e026 Add migration to populate run_time where needed
The existing migration to add an avg run_time column to the tests table
neglected to calculate the run_time for existing rows and instead just
added a NULL value. Since this migration is part of a released version
of subunit2sql it's too late to add support for adding a run_time to
the columns where it makes sense. This commit adds a new migration
that will add the avg run_time for each test in the tests table where
there are successful test runs and the run_time is still set to NULL.

Additionally there were a couple of fixes around adding migrations
that needed to be added here, mostly just changing the base
alembic.ini to reflect the new relative path of the migration dir and
ignoring an additional pep8 rule which conflicted with the sqlalchemy
syntax.

Change-Id: I0b9c673106c41e9e66a2be5da6ebe9ca58d0ad36
2014-10-06 22:32:45 +00:00
Andrea Frittoli 39e58c6af6 Cleanup some extra spaces
Change-Id: Ibb5d2c4cbf00e1afafb4e724c64a5eb4952dd762
2014-10-06 22:02:27 +01:00
Matthew Treinish f1b08f61a2 Add sample config files for commands
This commit adds a sample config file for each of the current 3
commands in subunit2sql. The files contain the current list of options
which can potentially be set in  a config file when using the command.
However for some of the arguments it doesn't make any sense to use them
outside of the cli.

The sample config files can be generated using the oslo-config-generator
utility with the config files added in the config-generator dir.

Change-Id: Ie578f99f27553e14fca4153a9ac5b5aa1c7eb49e
2014-10-06 20:29:49 +00:00
Matthew Treinish db943945f3 Update pep8 ignore list
This commit updates the ignore list for the new hacking version. Some
additional rule skips are needed for various reasons.

Change-Id: I0f037978b76dec05cfd5eab6038252f6bc6c6db3
2014-09-03 09:10:00 -04:00
Matthew Treinish 423d13aff2 Add basic unit tests
This commit adds the first unit tests to the projects. Right now
it's just testing a couple of utility methods. Mostly because they
were the easiest tests to write.
2014-06-24 20:14:18 -04:00
Matthew Treinish 9d86270fac Initial commit
This just adds the basic framework for all the various pieces. The
schema will be built using alembic. Everything else is untested.
2014-06-12 23:59:00 -04:00