Commit Graph

20 Commits

Author SHA1 Message Date
Samarah
cd1d249678 QA: Add D4N teuthology suite
Signed-off-by: Samarah <samarah.uriarte@ibm.com>
2023-06-06 14:04:47 -04:00
Kefu Chai
127dd54db8 qa: add pytest to deps of py3 env
otherwise it is mising when running test, and we'd have following
failure:

py3: exit 2 (0.00 seconds) /home/jenkins-build/build/workspace/ceph-pull-requests/qa> pytest --assert=plain test_import.py

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-12-08 23:57:59 +08:00
Kefu Chai
bc2b551e9f qa: set locale to C.UTF-8 in tox.ini
as ansible is using UTF-8 encoded characters in the file names, so,
to avoid failures like:

  File "/home/jenkins-build/build/workspace/ceph-pull-requests/qa/.tox/py3/lib/python3.10/site-packages/pip/_internal/utils/unpacking.py", line 217, in untar_file
    with open(path, "wb") as destfp:
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 137-140: ordinal not in range(256)

we have to set a locale which is able to handle UTF-8.

see also https://github.com/ceph/teuthology/pull/1671

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-12-08 22:39:57 +08:00
Ernesto Puerta
e91773df68
qa: fix teuthology master branch ref
Fixes: https://tracker.ceph.com/issues/55826
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2022-06-02 12:27:02 +02:00
Sebastian Wagner
7777603e8b
qa: tox.ini: verify yaml syntax
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-09-07 10:20:34 +02:00
Sebastian Wagner
c6779fdf13
qa/tox.ini: check for dead symlinks
IMO the amount of symlinks we have to manually maintain
is tedious and error prone. Any ideas on improving thing?

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-09-03 11:38:04 +02:00
Sebastian Wagner
ddfb5eb838
qa: convert test_import.py to pytest
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-07-02 10:35:19 +02:00
Sebastian Wagner
8d5f27599a
qa/tox.ini: rename pytest environment to py3 to match CMakeLists.txt
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-07-02 10:35:11 +02:00
Sebastian Wagner
04e586f90a
global,tox.ini: add mypy-constrains.txt
let's avoid getting new versions of those packages by accident.
Unfortunately this means we have to manually update those
packages regurarly.

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-16 12:37:46 +02:00
Sebastian Wagner
1f6b4744b5 qa: Upgrade to mypy 0.901
mypy 0.9 now requires stub packages

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-09 12:53:21 +02:00
Sebastian Wagner
3fab28a55f src,qa: Upgrade to mypy 0.812
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2021-06-09 12:39:58 +02:00
Sebastian Wagner
8b55bb6556 src,qa: Upgrade to mypy 0.790
dashboard/tools: Make sure {begin,end}_time are set.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-12-09 09:18:16 +01:00
Sebastian Wagner
78f3473f55 qa,src: update mypy to 0.782
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-06-26 12:27:32 +02:00
Kefu Chai
c02748c8df qa: drop flake8-py2 test
as we've dropped py2 support, no need to run flake8 with python2
anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-23 23:00:56 +08:00
Sebastian Wagner
d6edd8199f qa/cephadm: Add local registry mirror
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-05-26 17:38:39 +02:00
Thomas Bechtold
cb8d906af5 qa: Add a tox env that can test importing files
While switching to python3, we need to make sure that we can import
the qa/tasks (and others, but this starts with qa/tasks) on a python3
environment.
To test this, we need to install teuthology into the test
venv. Currently, teuthology is not py3 ready so this will fail.

To test the current state of the qa/tasks directory with the ongoing
work for python3 within teuthology, you can now do:

TEUTHOLOGY_GIT=git+https://github.com/kshtsk/teuthology.git@wip-py3-compat \
    tox -eimport-tasks

This is using the current branch from
https://github.com/ceph/teuthology/pull/1362 which does the work to
make teuthology python3 ready.

NOTE: This tox env is not activated by default. It's currently failing
but it provides a way to iterate over the failures and once we have
them fixed, we can activate the tox env during make-check.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2020-03-26 16:16:31 +08:00
Sebastian Wagner
e34b60869d python: fixate mypy requirement to mypy==0.770
I don't like suprises when upstream publishes a new mypy version.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-03-12 16:27:45 +01:00
Thomas Bechtold
46e22c422b qa: Enable basic mypy support for qa/ directory
A first step to do more automatic code checks on the qa/
directory. This is useful while transitioning to python3.

Also use log_exc to top-level to not run into:

error: Argument 1 to "log_exc" has incompatible type
  "Callable[[OSDThrasher], Any]"; expected "OSDThrasher"

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2020-03-05 06:54:56 +01:00
Thomas Bechtold
bdcc94a1d1 qa: Run flake8 on python2 and python3
To be able to catch problems with python2 *and* python3, run flake8
with both versions. From the flake8 homepage:

It is very important to install Flake8 on the correct version of
Python for your needs. If you want Flake8 to properly parse new
language features in Python 3.5 (for example), you need it to be
installed on 3.5 for Flake8 to understand those features. In many
ways, Flake8 is tied to the version of Python on which it runs.

Also fix the problems with python3 on the way.
Note: This requires now the six module for teuthology. But this is
already an install_require in teuthology itself.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-13 09:24:20 +01:00
Sage Weil
c01f2ee0e2 move ceph-qa-suite dirs into qa/ 2016-12-14 11:29:55 -06:00