diff options
author | jaseg <git@jaseg.de> | 2024-07-19 14:04:24 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2024-07-19 14:04:24 +0200 |
commit | b23cafbfd45bdf5d010c5a203e6873e573f145fb (patch) | |
tree | cc48351eed4d09a9207f2604cbd00a04a595486b /gerbonara/tests | |
parent | 78ffb61aeed98e7175fff493903ef5d1a10d2fe8 (diff) | |
download | gerbonara-b23cafbfd45bdf5d010c5a203e6873e573f145fb.tar.gz gerbonara-b23cafbfd45bdf5d010c5a203e6873e573f145fb.tar.bz2 gerbonara-b23cafbfd45bdf5d010c5a203e6873e573f145fb.zip |
tests: add status messages
Diffstat (limited to 'gerbonara/tests')
-rw-r--r-- | gerbonara/tests/conftest.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gerbonara/tests/conftest.py b/gerbonara/tests/conftest.py index 95d6507..242ec04 100644 --- a/gerbonara/tests/conftest.py +++ b/gerbonara/tests/conftest.py @@ -18,6 +18,7 @@ def pytest_assertrepr_compare(op, left, right): f' Calculated difference: {diff}', f' Histogram: {diff.histogram}', ] + # store report in node object so tmp_gbr can determine if the test failed. @pytest.hookimpl(tryfirst=True, hookwrapper=True) def pytest_runtest_makereport(item, call): @@ -25,6 +26,7 @@ def pytest_runtest_makereport(item, call): rep = outcome.get_result() setattr(item, f'rep_{rep.when}', rep) + fail_dir = Path('gerbonara_test_failures') def pytest_sessionstart(session): if 'PYTEST_XDIST_WORKER' in os.environ: # only run this on the controller @@ -53,8 +55,10 @@ def pytest_configure(config): if not lib_dir.is_dir(): raise ValueError(f'Path "{lib_dir}" given by KICAD_FOOTPRINTS environment variable does not exist or is not a directory.') - print('Checking and bulk re-building KiCad footprint library cache') + print('Updating podman image') subprocess.run(['podman', 'pull', 'registry.hub.docker.com/kicad/kicad:nightly'], check=True) + + print('Checking and bulk re-building KiCad footprint library cache') with multiprocessing.pool.ThreadPool() as pool: # use thread pool here since we're only monitoring podman processes lib_dirs = list(lib_dir.glob('*.pretty')) res = list(tqdm.tqdm(pool.imap(lambda path: bulk_populate_kicad_fp_export_cache(path), lib_dirs), total=len(lib_dirs))) |