From 5de2373361a77def6b2f7860ebfe0d290b10463f Mon Sep 17 00:00:00 2001 From: "F.Tibor" Date: Wed, 8 Apr 2026 12:02:45 +0200 Subject: [PATCH 1/2] Define how to run tests --- CONTRIBUTING.md | 13 ++++++++++++- run_tests.sh | 8 ++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 run_tests.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 17db874a..46a32d7b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,4 +49,15 @@ test/test.sh | Functional and unit test runner Submitting a patch and testing ------- -Before submitting any changes please make sure all tests and checks are passed, pylint doesn't show warnings on new code, and fill out the Pull Request template. If you are a new contributor, and the template is confusing, feel free to submit the PR and we will help you iron it out! On how to run or add a new test, please see [test/README.md](test/README.md). +Before submitting any changes please make sure all tests and checks are passed. + +You must run the following tests locally: +* `pylint .` +* `bazel test //...` +* `pytest test` + + +On how to run or add a new test, please see [test/README.md](test/README.md). + + +Finally, fill out the Pull Request template. If you are a new contributor, and the template is confusing, feel free to submit the PR and we will help you iron it out! diff --git a/run_tests.sh b/run_tests.sh new file mode 100755 index 00000000..8287ade0 --- /dev/null +++ b/run_tests.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# This script currently assumes that the user have set up their environment. +# This means users using bazelisk have set their bazel version. +# Either with the environment variable: USE_BAZEL_VERSION +# or with the .bazelversion file. +pylint . +bazel test //... +pytest test/ From 91f8ea4f6282e7a1bc05825f75714b846b59fde0 Mon Sep 17 00:00:00 2001 From: "F.Tibor" Date: Tue, 5 May 2026 11:11:42 +0200 Subject: [PATCH 2/2] Define micromamba as defacto environment manager --- .ci/micromamba/dev.yaml | 3 +-- run_tests.sh | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.ci/micromamba/dev.yaml b/.ci/micromamba/dev.yaml index 49133464..798cffc6 100644 --- a/.ci/micromamba/dev.yaml +++ b/.ci/micromamba/dev.yaml @@ -6,9 +6,8 @@ dependencies: - pytest - pylint - pycodestyle - - buildifier - clang - clang-tools - - bazel=6 + - bazel=7 - pip: - codechecker==6.25 diff --git a/run_tests.sh b/run_tests.sh index 8287ade0..58519a3a 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -1,8 +1,16 @@ #!/usr/bin/env bash -# This script currently assumes that the user have set up their environment. -# This means users using bazelisk have set their bazel version. -# Either with the environment variable: USE_BAZEL_VERSION -# or with the .bazelversion file. + +cleanup() { + # Very important + # reactivation of the mamba environment is not possible if skipped + bazel clean + micromamba deactivate +} + +trap cleanup EXIT + +source ./.ci/micromamba/init.sh + pylint . bazel test //... -pytest test/ +pytest test