mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-23 13:56:20 +00:00
test: Skip cleanup test if not built out of tree
With commit 42c0e5bb05
("test: Find leftovers after clean/mrproper")
we assume that we are performing out of tree builds. test_clean and
test_mrproper fail if the assumption isn't met.
However there are valid scenarios where tests run with in source builds
(i.e., test.py --build-dir=.).
Automatically skip cleanup tests in such scenarios to prevent false
positives.
Signed-off-by: Tobias Deiminger <tdmg@linutronix.de>
Reviewed-by: Harald Seiler <u-boot@rahix.de>
This commit is contained in:
parent
3c3270b569
commit
2d30b293c8
1 changed files with 5 additions and 0 deletions
|
@ -17,6 +17,11 @@ import pytest
|
|||
@pytest.fixture
|
||||
def tmp_copy_of_builddir(u_boot_config, tmp_path):
|
||||
"""For each test, provide a temporary copy of the initial build directory."""
|
||||
if os.path.realpath(u_boot_config.source_dir) == os.path.realpath(
|
||||
u_boot_config.build_dir
|
||||
):
|
||||
pytest.skip("Leftover detection requires out of tree build.")
|
||||
return None
|
||||
shutil.copytree(
|
||||
u_boot_config.build_dir,
|
||||
tmp_path,
|
||||
|
|
Loading…
Add table
Reference in a new issue