Skip to content

Commit

Permalink
Merge pull request #75 from dinkelk/main
Browse files Browse the repository at this point in the history
Add `redo test` command logging to `redo test_all`
  • Loading branch information
dinkelk authored Sep 14, 2024
2 parents 934db8b + 917cd68 commit 352bbdb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion redo/rules/build_test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ def build(self, redo_1, redo_2, redo_3):

# Make a build directory at the top level:
failed_test_log_dir = os.path.join(directory, "build" + os.sep + "failed_test_logs")
log_dir = os.path.join(directory, "build" + os.sep + "log")
filesystem.safe_makedir(failed_test_log_dir)
filesystem.safe_makedir(log_dir)

# Run tests:
exit_code = 0
Expand All @@ -86,7 +88,8 @@ def build(self, redo_1, redo_2, redo_3):
sys.stderr.flush()
database.setup.reset()
try:
redo.redo([os.path.join(test, "test"), "1>&2", "2>/dev/null"])
test_log = os.path.join(log_dir, rel_test.replace(os.sep, "_") + ".log")
redo.redo([os.path.join(test, "test"), "1>&2", "2>" + test_log])
sys.stderr.write(" " + PASSED + "\n")
except BaseException:
exit_code = 1
Expand Down

0 comments on commit 352bbdb

Please sign in to comment.