62 Commits

Author SHA1 Message Date
Slawek Kaplonski
9733a4fe10 Add script which helps abandon old patches in gerrit
This script is almost the same as script in neutron repo [1]
but without closing Launchpad bugs as Tobiko don't use Launchpad
as a bug tracker.

[1] https://opendev.org/openstack/neutron/src/branch/master/tools/abandon_old_reviews.sh

Change-Id: I790c6692b05382353e630d23e3b45245a09b678f
2023-02-16 09:00:00 +01:00
Slawek Kaplonski
d1d3ea7c19 Configure limit of opened files for the test runner process
For some reason, when Tobiko retries many times ssh connection
and logs a lot of data in the log file, pytest may fail with
"Too many open files" exception raised.
To avoid that lets try to configure soft ulimit for opened files
to be as high as possible (same as hard limit).

Change-Id: I6fb8977d7909798a5ab6be499044cc74ac34dfa2
2022-08-19 16:54:04 +02:00
Federico Ressi
7d7ee9691f Fix bindeps installation on CentOS
Change-Id: I55d2dcc3652543d221b5c60967bff148fa98505e
2022-01-21 14:36:34 +00:00
Federico Ressi
2ac4100069 Update run_tests.py environment variable names
Change-Id: I5f6ad7369f10df04f02aa96b22ab8236a0e060ef
2022-01-07 14:06:45 +00:00
Slawek Kaplonski
8a57fc3418 Add "--always" option to the git describe command in tools
It seems that without that option our docs builds on readthedocs
are failing now. Git advices there to use "--always" option so lets
try that.

Change-Id: I90ccccb51e46353495e6cc42547a30b842d90805
2021-12-17 14:53:09 +00:00
Zuul
7af23e5159 Merge "Handle file removal concurrency" 2021-11-03 17:59:11 +00:00
Federico Ressi
f841c0826b Handle file removal concurrency
Change-Id: I976faf0f5f66403bdd4f0a01e7d9aef451db5003
2021-11-03 12:52:10 +00:00
Federico Ressi
5776ac688c Set default test path for the run_tests script
Change-Id: Id001383f26233c6df1b2fc3b7d125d0b491e0e9a
2021-11-03 11:49:11 +00:00
Federico Ressi
d65d80efdc Add podman 1.6.0 source files and update requirements
New requirements:
 - podman
 - python-dateutil>=2.8.0
 - varlink

Change-Id: I7c5ec418fd8f9c7d0d36fce033fe588a59e36f5d
2021-10-27 16:34:09 +02:00
Federico Ressi
03b9eec659 Use local upper-constraints.txt
- Remove support for constrains file from infrared plugin
- Use file stored on tobiko repository by default

Change-Id: I0f835d753fb9d3a1670e8eb9b196e02e989d4262
2021-10-27 14:33:56 +02:00
Federico Ressi
03853a7593 Increase pytest command verbosity
This should help investigating on tests timeout sissues.

Change-Id: I91b16f5775c8ebd5f03763e8848de7efd886d7a5
2021-09-27 09:33:43 +02:00
Federico Ressi
4f7e678f95 Fix podman1 installation
Change-Id: I25ee085621f7f947b31bb38c55e1683c485b5da9
2021-05-21 12:45:53 +02:00
Federico Ressi
6a56f0f0fb Let rename old podman varlink package as podman1
This allows to import old varlink based podman client
ase podman1 while keeping safe to install the new
client podman-py package as podman.

To archive such result it first temporarly rename existing podman
dir, then install podman package on its place, renames it as
podman1, and finally restore pre-existing podman directory
if any initially found.

Change-Id: If834cc383f11e656f17e49d5e6fa401ac8bee829
2021-05-19 21:05:44 +00:00
Federico Ressi
71b1979e0c Fix install-bindeps.sh to work without sudo
Change-Id: Idce7dfb02cb6a8657f83458c5e20e682b012f348
2021-04-08 10:27:49 +00:00
Federico Ressi
7207175342 Update pytest reports generation
- Set workflow step name as junit test suite name
- Set HTML report title
- Render HTML report all test case rows collapsed
- Add tobiko release version and Git commit to
  reported environment metadata

Change-Id: Id827146d1f8455047dd5eedfa90171da8be02ea5
2021-02-04 15:07:23 +00:00
Federico Ressi
190451d1ed Use pytest-cov plugin for getting coverage
Change-Id: Ifb5db0e8b1e12cf7d14045c2ccc7fc5ebfeaa40b
2021-01-27 21:11:21 +00:00
Federico Ressi
db64a23d0d Use pytest timeout and log capturing
Change-Id: I4d3394274c410ff8c424fe166a1657b2540f47fd
2021-01-27 21:10:27 +00:00
Federico Ressi
d44b3051bf Add check requirements job
Change-Id: I06e035a5570ffd25563f0483e6859ea55825b6f1
2021-01-05 13:35:44 +01:00
Federico Ressi
4d88f7d81a Update requirements
Requires docker==4.4.1 since version 4.4.0 can't be installed
Rerun tests on integration failures
Remove redundant requirements

Co-Author: pini <pkomarov@redhat.com>
Change-Id: I0cd54b6a9361e8e3c3205da2ba939baba2c6b1ce
2021-01-04 15:20:06 +01:00
Federico Ressi
3ce3c741e5 Switch to pytest test runner
Change-Id: I8132e07ad624fe9faa01265d700b5eb37b94815f
2020-12-18 13:51:08 +00:00
Federico Ressi
9c2a2e749d Pass broken jobs with Python 3.8 (Ubuntu Focal and Fedora 32)
- Pass linters and lower-constrains jobs with Python 3.8
- Use master version of pylint only with python version >= 3.9
- Update requirements files
- Fix install_bindeps.sh
- Disable running DevStack jobs on ubuntu focal nodes

Change-Id: Ie745fe5b5a08fe088fcf39edb312170c6cbdc5bb
2020-12-10 13:00:04 +01:00
Federico Ressi
71e79acb59 Fix testenv use of posargs in tox.ini
Change-Id: I0699a92d84cf67c42ccd695ade98e1a985039b58
2020-10-21 06:20:56 +02:00
Federico Ressi
3df2bb87f1 Add TOX_PYDEV_DEBUG env variable to run_tests.py
Add new env variable to handle test cases
execution when debugging test cases under a
debugger by using testools.run runner.

Change-Id: Ia6ec38e6471d93dd98c3fef17e66e9187c666c9d
2020-10-13 15:53:43 +02:00
Federico Ressi
31a9a6e8e6 Add a timeout for workflow stages
Change-Id: I9938a8bbd71ab131c8b6a2210e5d1a903ef21efd
2020-09-28 12:04:49 +02:00
Federico Ressi
7d20c11226 Skip functional test cases requiring Keystone credentials
Change-Id: Ib2143b49f8028ec6e4476dece8f8072cd9690967
2020-09-23 12:03:27 +00:00
Federico Ressi
ebb5ff5c0a Workaround infrared setup failures
Change-Id: I601ce00ef00822e602a4f7f50357cd134b564ad5
2020-07-03 14:07:23 +02:00
Federico Ressi
69ea632d3e Update Dockerfile to use bindep and tox
Change-Id: I1fd2e966863908751ab5cba685e99c1ddf07b582
2020-06-19 07:39:26 +02:00
Federico Ressi
f530416164 Add tool to install bindeps
Change-Id: I1d6152924cffa168ad3199cf97506ac597257e45
2020-06-15 16:44:27 +02:00
Federico Ressi
151bfae959 Delete IR workspace before importing new one
Change-Id: Ib6c7c16bf3656dcfbdde3221fce1c07c5c05b502
2020-06-09 14:59:10 +02:00
Federico Ressi
c50ab412a0 Create Docker files for Tobiko project
- Dockerfile file is intended for running test cases
  without using tox
- infrared_plugin/Dockerfile file is intended to run
  Tobiko IR plugin
- docker-compose file is intended to emulate the tox
  experience by using docker

All images are build staring from official CentOS 8
image.

Change-Id: I2f57f6e1c9c6161cef9448d25027d784ebd37e2c
2020-06-01 10:19:21 +02:00
Federico Ressi
dfef18e978 Remove old IR plugin and old related CI tools
Change-Id: I79f07a19098fb07cb64b854d186463918ae35755
2020-05-12 10:39:20 +02:00
Alex Katz
32c91c7264 Added --ignore-test-failures CLI flag
Tox venv commands are expected to return a code that indicates
test cases final outcome:

 - 0 => any test vase has failed
 - 1 => some test case has failed
 - not in [0, 1] => any other error

This change handles the special case when some test cases have
failed. In any of below cases:
 - JENKINS_URL environment variable is defined on controller node
 - --ignore-test-failure flag is passed to IR plugin
then the plugin runs without treating it as an error.

This has been introduced because when running the plugin from
a Jenkins slave host, Jenkins itself is expected to check test
case have failed looking at produced Junit XML artifacts.

Change-Id: Ia7d7f736ae18a7561dced2271228d86ca658e892
2020-05-11 13:57:26 +00:00
Federico Ressi
92248c8506 Refactor test execution scripts
- Acreate a new tools/run_tests.py script to
  execute test cases
- Move report generation to such script and
  remove 'report' tox environment
- Running test cases generates report files
  (.log, .html, .xml) into 'report/{envname}'
  directory
- Test cases failures will returns exit code 1
  Other script test runner failures returns
  exit code 2

Big refactory to tox.ini file to try semplifying it:

- create the new 'py3' tox environment for running unit
  tests as default platform python 3 interpreter
- use same as py3 '{envdir}' for scenario, functional,
  neutron and faults tox environments

Change-Id: Id09425245cc86b84b41e6b3b1c1db759cc686f3a
2020-05-06 17:41:35 +02:00
Federico Ressi
31f6026ab9 Implement test workflow steps
Change-Id: I34026836ac42dd6f2a5e5dfc05203c460cc949fc
2020-04-08 14:32:58 +02:00
Federico Ressi
86441d7aac Update roles requiring python
Change-Id: Iae5cd4affc3e7d148221e55768fbdf6d28907e54
2020-04-03 11:10:38 +00:00
Federico Ressi
e116222308 Allow to specify python interpter used for testing IR plugin
Change-Id: I2ea68efed1fe1c0dc22b3c49118cfc5c93c8a037
2020-04-01 08:42:00 +00:00
Federico Ressi
5a41476432 Separate run_tox and make_report tasks
Change-Id: Ic064cdaa2b001358f3748b433baa1f9055db940a
2020-03-23 20:25:24 +00:00
Federico Ressi
1874cd6b14 Fix tox environemnt setup when missing binary packages
Change-Id: Ifb3c74e1de31e66cd1383379f8f9b00af97eadf7
2020-03-17 14:07:52 +01:00
Federico Ressi
b1815b45f8 Allow to get prefix of base python interpreter
Change-Id: Ia56cd2002a790e941bdb4070978116609b7d7968
2020-03-17 14:07:52 +01:00
Federico Ressi
76999d710e Reduce verbosity of make_report script
Change-Id: I330ad250584fb8ffce8bf27bcb6fdca2ba3c88e4
2020-03-17 14:07:52 +01:00
Federico Ressi
f53cf0f1cb Download IR workspace from a URL before importing it
Change-Id: I82aa2c5b779b18291b87ee9dee6ba44179466ef4
2020-03-11 14:16:25 +01:00
Federico Ressi
447231ef0a Import infrared workspace if available
Change-Id: I06469d73e4da3005bccc6333becb5a0a69e4c89c
2020-03-11 11:42:14 +01:00
pinikomarov
b165c8e2ff unblock Downstream CI : STDERR: virtualenv.py: error: no such option: --seeder
seeder option is in the newest virtualenv only ,
and under this condition, virtualenv will never upgrade :

[stack@undercloud-0 tobiko]$ if ! python3 -m virtualenv --version; then
> virtualenv --version;fi
16.0.0

Change-Id: I86c5bf6429a5ae67b049fb88564ff7b7ef72968c
2020-02-21 01:45:42 +02:00
Federico Ressi
2e3af9b534 Fix Tox Infrared job
Change-Id: Ie4ad2f23e1e518c688dc4334acaa3379827ac146
2020-02-18 15:40:01 +01:00
Federico Ressi
e91356faeb Fix tools/ci/tox script when 'python' command is not available
Change-Id: I73f5b45de60f47a489a8140ab63baa899599e34e
2020-01-27 11:38:01 +01:00
Federico Ressi
7ead7d7602 Missing binary packages don't interrupt tools/ci/tox script
Change-Id: Id763634bb436b598fd90ea8e2f51d5f4e3fcfdd1
2020-01-23 14:40:25 +01:00
Federico Ressi
eb10374b68 Move realpath implementation tools/ci/activate
Change-Id: Ie1523acbe5b30be90ec21bf825ac54ce809db454
2020-01-23 12:16:06 +01:00
Federico Ressi
71b25c3483 Fix tools script python warnings
Change-Id: Ibdcd957ef689efd3ca0bd4ee729eb9f1e767413a
2020-01-17 07:45:09 +00:00
Federico Ressi
a9e9d5ee60 Create Tox InfraRed upstream job
Change-Id: Ib816520d63a51ae37a9be8f2036131bd58ecd054
2020-01-16 15:53:38 +00:00
Federico Ressi
e41d31589b Install missing dependencies on Ubuntu
* Install missing binary dependencies on Ubuntu

* Workarounds known Ubuntu get-pip issue #43
  (https://github.com/pypa/get-pip/issues/43)

Change-Id: Ic38646443e8cd0f0bf46017d4c116620a49bb4dd
2020-01-09 12:13:25 +01:00