Staging instance, all changes can be removed at any time

Skip to content

Makefile.local: add dependency between test and ts-build-so targets

For some reasons, I have the following error when calling make test.

python3 -m pytest  .
============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.9.2, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/anlambert/swh/swh-environment/swh-search, configfile: pytest.ini
plugins: django-4.4.0, mock-3.6.1, flask-1.2.0, hypothesis-6.14.7, requests-mock-1.9.3, redis-2.1.1, forked-1.3.0, asyncio-0.15.1, postgresql-2.6.1, django-test-migrations-1.1.0, xdist-2.3.0, dash-1.21.0, swh.core-0.14.4, swh.journal-0.8.0
collected 0 items / 1 error                                                                                                                                                                                      

===================================================================================================== ERRORS =====================================================================================================
_________________________________________________________________________________________ ERROR collecting test session __________________________________________________________________________________________
../../../.virtualenvs/swh/lib/python3.9/site-packages/_pytest/config/__init__.py:570: in _importconftest
    mod = import_path(conftestpath, mode=importmode)
../../../.virtualenvs/swh/lib/python3.9/site-packages/_pytest/pathlib.py:544: in import_path
    raise ImportPathMismatchError(module_name, module_file, path)
E   _pytest.pathlib.ImportPathMismatchError: ('swh.search.tests.conftest', '/home/anlambert/swh/swh-environment/swh-search/swh/search/tests/conftest.py', PosixPath('/home/anlambert/swh/swh-environment/swh-search/build/lib/swh/search/tests/conftest.py'))
============================================================================================ short test summary info =============================================================================================
ERROR  - _pytest.pathlib.ImportPathMismatchError: ('swh.search.tests.conftest', '/home/anlambert/swh/swh-environment/swh-search/swh/search/tests/conftest.py', PosixPath('/home/anlambert/swh/swh-environment/s...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================================ 1 error in 0.44s ================================================================================================

Setting TEST_DIRS in Makefile.local fix that issue.

Also make test target depends on ts-build-so one as tests will fail if the swh_ql.so file does not get loaded.


Migrated from D6117 (view on Phabricator)

Merge request reports

Loading