Skip to content

Commit

Permalink
run-tests: make temp file under tests directory
Browse files Browse the repository at this point in the history
Summary:
our .gitignore only ignores temporary files inside tests
directory, so if we run 'run-tests.py' outside of tests directory, we will
see some unstracted .test* files.

Reviewed By: sggutier

Differential Revision: D54749212

fbshipit-source-id: a05d8679ba53188c6cb3d395baade661e7b440ee
  • Loading branch information
zzl0 authored and facebook-github-bot committed Mar 11, 2024
1 parent 017c367 commit 4a0b14d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eden/scm/tests/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3033,7 +3033,9 @@ def run(self, test):
self.stream.write("\n")
# Also write the file names to temporary files. So it can be
# used in adhoc scripts like `hg revert $(cat .testfailed)`.
with open(".test%s" % title.lower(), "a") as f:
testsdir = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(testsdir, f".test{title.lower()}")
with open(filepath, "a") as f:
for name in names:
f.write(name + "\n")
f.write("\n")
Expand Down

0 comments on commit 4a0b14d

Please sign in to comment.