summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-12-11 19:22:44 +0200
committerLars Wirzenius <liw@liw.fi>2020-12-11 19:22:44 +0200
commit2035df9b6bad93a88fba7cd572d9939d1d6fa18d (patch)
tree0b32c48be6165b83adf390245d829bf91d3b793d
parent01b9765db0feb3f1f36eec4d71489ccbaa6496b5 (diff)
downloadobnam2-2035df9b6bad93a88fba7cd572d9939d1d6fa18d.tar.gz
fix: how manifests are created and compared
-rw-r--r--subplot/data.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/subplot/data.py b/subplot/data.py
index c4cb0a7..9eadd3f 100644
--- a/subplot/data.py
+++ b/subplot/data.py
@@ -28,7 +28,8 @@ def _create_manifest_of_directory(ctx, dirname=None, manifest=None):
runcmd_get_exit_code = globals()["runcmd_get_exit_code"]
runcmd_get_stdout = globals()["runcmd_get_stdout"]
- runcmd_run(ctx, ["summain", dirname])
+ logging.info(f"creating manifest for {dirname} in {manifest}")
+ runcmd_run(ctx, ["find", "-exec", "summain", "{}", "+"], cwd=dirname)
assert runcmd_get_exit_code(ctx) == 0
stdout = runcmd_get_stdout(ctx)
open(manifest, "w").write(stdout)
@@ -38,7 +39,7 @@ def files_match(ctx, first=None, second=None):
assert_eq = globals()["assert_eq"]
f = open(first).read()
- s = open(first).read()
- logging.debug(f"files_match: f={f!r}")
- logging.debug(f"files_match: s={s!r}")
+ s = open(second).read()
+ logging.debug(f"files_match: f:\n{f}")
+ logging.debug(f"files_match: s:\n{s}")
assert_eq(f, s)