fix: hold the empty sweep to the no-pack rule

The older test read an --all check of an empty directory as a pass; it checked nothing, which the verify-packs rule now refuses.
This commit is contained in:
Abdessamad Derraz committed 2026-10-19 04:23:26 +02:00
1 parent 6d860a0df6
commit 18cca66e58
1 file changed
+4 -2
+4 -2
View File
@@ -2458,13 +2458,15 @@ class ACheckThatCannotAnswerDoesNotPass(unittest.TestCase):
"a named platform with no pack reported success:\n"
+ named.stdout + named.stderr,
)
# --all is a sweep: a platform nobody built is out of scope.
# --all is a sweep: a platform nobody built is out of scope and
# skipped, but a sweep that found no pack at all checked nothing.
swept = subprocess.run(
[sys.executable, "scripts/generate_pack.py", "--all",
"--verify-packs", "--output-dir", directory],
capture_output=True, text=True, cwd=str(ROOT), timeout=300,
)
self.assertEqual(swept.returncode, 0, swept.stdout + swept.stderr)
self.assertIn("SKIP (no pack in", swept.stdout)
self.assertNotEqual(swept.returncode, 0, swept.stdout + swept.stderr)
def test_an_unsatisfiable_declared_path_is_reported(self):
from scripts.restore_large_files import restore