OSDN Git Service

CMake: if pylint is available, run it as part of the test-suite
authorAdriaan de Groot <groot@kde.org>
Mon, 27 Sep 2021 15:52:02 +0000 (17:52 +0200)
committerAdriaan de Groot <groot@kde.org>
Mon, 27 Sep 2021 19:02:18 +0000 (21:02 +0200)
commit719548213f00a504f383ca67f8cc5f051586f3f3
tree82f729b09dfbefb6f5fc333c194f4db9b9cfa781
parent836ea55dbd1da35ea0c4f4205662de4693827fe2
CMake: if pylint is available, run it as part of the test-suite

This introduces a stub-implementation (fake) that mimics the
API offered by libcalamares (the library is actually exposed
to Python via Boost::Python, so it doesn't act like a C-extension).
Using that stub-implementation, we can check Python modules for
validity as part of the test-suite.

The stub-implementation is needed, because otherwise every
Python module already fails at `import libcalamares`.

- stub-implement the API that is actually used by the Python modules
- in globalstorage, be slightly smart about what keys are being
  requested (so that e.g. all the modules that handle partitions
  information get an empty list and can manipulate that, instead of
  erroring out when they get a string)
CMakeModules/CalamaresAddModuleSubdirectory.cmake
ci/libcalamares/__init__.py
ci/libcalamares/globalstorage.py
ci/libcalamares/utils.py