summaryrefslogtreecommitdiff
path: root/tools/testing/kunit/kunit_tool_test.py
diff options
context:
space:
mode:
authorDaniel Latypov <dlatypov@google.com>2021-11-03 07:22:28 +0300
committerShuah Khan <skhan@linuxfoundation.org>2021-12-13 23:35:22 +0300
commitee92ed38364e7073bb741577d7b243b232442014 (patch)
treeb630a257de64169511fc795bf2546880dcda4548 /tools/testing/kunit/kunit_tool_test.py
parent58b391d74630df14ea47f3e29c8e55a7364741ae (diff)
downloadlinux-ee92ed38364e7073bb741577d7b243b232442014.tar.xz
kunit: add run_checks.py script to validate kunit changes
This formalizes the checks KUnit maintainers have been running (or in other cases: forgetting to run). This script also runs them all in parallel to minimize friction (pytype can be fairly slow, but not slower than running kunit.py). Example output: $ ./tools/testing/kunit/run_checks.py Waiting on 4 checks (kunit_tool_test.py, kunit smoke test, pytype, mypy)... kunit_tool_test.py: PASSED mypy: PASSED pytype: PASSED kunit smoke test: PASSED On failure or timeout (5 minutes), it'll dump out the stdout/stderr. E.g. adding in a type-checking error: mypy: FAILED > kunit.py:54: error: Name 'nonexistent_function' is not defined > Found 1 error in 1 file (checked 8 source files) mypy and pytype are two Python type-checkers and must be installed. This file treats them as optional and will mark them as SKIPPED if not installed. This tool also runs `kunit.py run --kunitconfig=lib/kunit` to run KUnit's own KUnit tests and to verify KUnit kernel code and kunit.py play nicely together. It uses --build_dir=kunit_run_checks so as not to clobber the default build_dir, which helps make it faster by reducing the need to rebuild, esp. if you're been passing in --arch instead of using UML. Signed-off-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: David Gow <davidgow@google.com> Reviewed-by: David Gow <davidgow@google.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/kunit/kunit_tool_test.py')
0 files changed, 0 insertions, 0 deletions