Skip to content

Commit bc1d3e9

Browse files
committed
fix: random dir for parallel tests
1 parent 7d94460 commit bc1d3e9

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Fix typo "to has been called"
66
- Add weekly downloads to the docs
7+
- Fix parallel runner
78

89
## [0.20.0](https://github.com/TypedDevs/bashunit/compare/0.19.1...0.20.0) - 2025-06-01
910

src/env.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ function env::print_verbose() {
120120
}
121121

122122
EXIT_CODE_STOP_ON_FAILURE=4
123-
TEMP_DIR_PARALLEL_TEST_SUITE="/tmp/bashunit/parallel/${_OS:-Unknown}"
123+
# Use a unique directory per run to avoid conflicts when bashunit is invoked
124+
# recursively or multiple instances are executed in parallel.
125+
TEMP_DIR_PARALLEL_TEST_SUITE="/tmp/bashunit/parallel/${_OS:-Unknown}/$(random_str 8)"
124126
TEMP_FILE_PARALLEL_STOP_ON_FAILURE="$TEMP_DIR_PARALLEL_TEST_SUITE/.stop-on-failure"
125127
TERMINAL_WIDTH="$(env::find_terminal_width)"
126128
FAILURES_OUTPUT_PATH=$(mktemp)

0 commit comments

Comments
 (0)