14 Commits

Author SHA1 Message Date
Federico Ressi
31a9a6e8e6 Add a timeout for workflow stages
Change-Id: I9938a8bbd71ab131c8b6a2210e5d1a903ef21efd
2020-09-28 12:04:49 +02:00
Federico Ressi
9cf069dbb0 Remove support for Python2.7 on all upstream jobs
Because upstream OpenStack requirements master branch
(Victoria) removed any support for Python 2.7 upstream
jobs started failing. We where only using Python 2
because infrared installation process fails on
RHEL/CentOS 7 and Python 3 due to lacking SE Linux
Python bindings.

This workaround this issue by removing support
for Python 2.7 and CentOS/RHEL 7. The support for
CentOS 7 could be restored once the IR issue has
been fixed.

Change-Id: I09d2577a0e5cb4c7efbb6863294f63b2dd88de0a
2020-05-18 14:58: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
388426812d Use upper-constraints file from requirements project
Change-Id: I26318898ced32248a2ff31a78ec15d49382b9027
2020-05-04 14:47:41 +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
0d9e88a6fe Verify infrared plugin actually collect output files
Change-Id: Ib4f8961f50bd3ed68e472eb0fb6be67e27f156f3
2020-04-02 07:59:20 +00:00
Federico Ressi
5c1edfac76 Add role to ensure tox is installed on target host
Change-Id: I8d2ee07bc84efb7eb0eb23a64ecdff97fd5cecb6
2020-04-01 12:22:27 +02:00
Federico Ressi
10c1eda1fc Add role to ensure python3 is installed on target host
Change-Id: I3b514f3a3cb1f50ac121ca9d865eb500cf49b975
2020-04-01 11:27:25 +02: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
71722d07c6 Use regular tox as default command
Change-Id: Id929b2bf80fd8e4898c743f9bfa085b431799de6
2020-03-17 13:40:44 +01:00
Federico Ressi
a4ab99ba89 Spliting infrared plugin into roles
Create a set of roles to be composed into a new infrared plugin. The
final goal for these roles is to be used for either downstream and
upstream CI

Change-Id: I48d5f500c2e694c3f94ee497a0df1d92b6c411b3
2020-03-17 11:07:08 +00:00