chore: delete temp files before, not after tests (#12932)

This commit is contained in:
Garmelon
2026-03-16 20:02:28 +01:00
committed by GitHub
parent 49715fe63c
commit ef87f6b9ac
10 changed files with 16 additions and 10 deletions

3
tests/.gitignore vendored
View File

@@ -2,8 +2,7 @@
/with_*_env.sh
# Created by test suite
*.out.produced
*.exit.produced
*.produced
# Created by bench suite
*.measurements.jsonl

View File

@@ -209,13 +209,14 @@ These files are available to configure a test:
- `<file>.before.sh`:
This file is executed before the test/benchmark.
Create or set up temporary resources used by the test here.
Usually, it is better to create temporary files or directories inside the test itself,
so they're also available when opening the file in your editor.
Delete temporary resources created by previous test runs here if necessary.
Don't create temporary resources here, the test file should do so itself if possible.
That way, they're also available when opening the file in your editor.
- `<file>.after.sh`:
This file is executed after the test/benchmark.
Delete temporary resources used by the test here.
Don't delete temporary resources here; do so in `<file>.before.sh` if necessary.
Instead, add any temporary resources to the directory's `.gitignore` file.
- `<file>.out.expected`:
The test fails if its stdout and stderr doesn't match this file's contents.
@@ -250,13 +251,14 @@ These files are available to configure a test:
- `<file>.before.sh`:
This file is executed before the test/benchmark.
Create or set up temporary resources used by the test here.
Usually, it is better to create temporary files or directories inside the test itself,
so they're also available when opening the file in your editor.
Delete temporary resources created by previous test runs here if necessary.
Don't create temporary resources here, the test file should do so itself if possible.
That way, they're also available when opening the file in your editor.
- `<file>.after.sh`:
This file is executed after the test/benchmark.
Delete temporary resources used by the test here.
Don't delete temporary resources here; do so in `<file>.before.sh` if necessary.
Instead, add any temporary resources to the directory's `.gitignore` file.
- `<file>.out.expected`:
The test fails if its stdout and stderr doesn't match this file's contents.

4
tests/elab/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
/IO_test.lean.dir/
/getline_crash.lean.tmp
/handleLocking.lean.lock
/stdio.lean.stdout*.txt

1
tests/elab_fail/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/file_not_found.lean.readonly.txt