#25 Create virtual test for each supported python
Opened 2 years ago by psss. Modified 2 years ago
tests/ psss/python tmt  into  master

file modified
+50 -4
@@ -27,10 +27,6 @@ 

  tier: 1

  tags: [venv]

  

- environment:

-     VERSION: 3.7

-     METHOD: venv

-     TOX: true

  duration: 10m

  component+:

      - python2
@@ -47,3 +43,53 @@ 

      - python-setuptools

      - python-virtualenv

      - python-tox

+ 

+ require:

+     - gcc

+     - virtualenv

+     - python3-devel

+     - python3-tox

+ 

+ /python27:

+     require+:

+       - python27

+       - python2-devel

+     environment:

+         VERSION: 2.7

+         METHOD: virtualenv

+ 

+ /python34:

+     require+:

+       - python34

+     environment:

+         VERSION: 3.4

+ 

+ /python35:

+     require+:

+       - python35

+     environment:

+         VERSION: 3.5

+ 

+ /python36:

+     require+:

+       - python36

+     environment:

+         VERSION: 3.6

+ 

+ /python37:

+     require+:

+       - python37

+     environment:

+         VERSION: 3.7

+ 

+ /python38:

+     require+:

+       - python38

+     environment:

+         VERSION: 3.8

+ 

+ /python39:

+     require+:

+       - python39

+     environment:

+         VERSION: 3.9

This allows to easily reference and run the venv.sh test against all supported pythons. See also related python-tox pull request which includes an example plan.

Suggestion: Move this to the python27 section.

What does the + stand for?

rebased onto 39462fb

2 years ago

Moved python2-devel into the /smoke/venv/python27 test. The + sign is used to extend inherited values. In this case common required packages are defined in the parent and each test extends them with relevant package. In this way you can for example run only a single test and only relevant required packages will be installed.

tmt run test --name 39

See fmf docs for detailed info about inheritance and merging.