check.py: compare the generated files' bytes, not their modes
Browse files
check.py
CHANGED
|
@@ -55,14 +55,14 @@ def check(ok: bool, what: str) -> None:
|
|
| 55 |
failures.append(what)
|
| 56 |
|
| 57 |
|
| 58 |
-
def files(root: Path) -> dict[str,
|
| 59 |
-
"""Relative path ->
|
| 60 |
-
|
|
|
|
| 61 |
for folder in ("tasks", "roles"):
|
| 62 |
for path in sorted((root / folder).rglob("*")):
|
| 63 |
if path.is_file():
|
| 64 |
-
out[str(path.relative_to(root))] =
|
| 65 |
-
os.access(path, os.X_OK))
|
| 66 |
return out
|
| 67 |
|
| 68 |
|
|
|
|
| 55 |
failures.append(what)
|
| 56 |
|
| 57 |
|
| 58 |
+
def files(root: Path) -> dict[str, bytes]:
|
| 59 |
+
"""Relative path -> bytes for the generated files under root (not their modes: a download
|
| 60 |
+
from the Hub has none, and Harbor runs the scripts with bash)."""
|
| 61 |
+
out = {"problems.json": (root / "problems.json").read_bytes()}
|
| 62 |
for folder in ("tasks", "roles"):
|
| 63 |
for path in sorted((root / folder).rglob("*")):
|
| 64 |
if path.is_file():
|
| 65 |
+
out[str(path.relative_to(root))] = path.read_bytes()
|
|
|
|
| 66 |
return out
|
| 67 |
|
| 68 |
|