Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix leftover temporary directories #45

Merged
merged 1 commit into from
Aug 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions clitest
Original file line number Diff line number Diff line change
Expand Up @@ -590,14 +590,6 @@ tt_make_temp_dir() {

### Init process

# Temporary files (using files because <(...) is not portable)
tt_temp_dir=
tt_make_temp_dir # sets global $tt_temp_dir
tt_temp_file="$tt_temp_dir/temp.txt"
tt_stdin_file="$tt_temp_dir/stdin.txt"
tt_test_ok_file="$tt_temp_dir/ok.txt"
tt_test_output_file="$tt_temp_dir/output.txt"

# Handle command line options
while test "${1#-}" != "$1"; do
case "$1" in
Expand Down Expand Up @@ -798,6 +790,14 @@ fi

### Real execution begins here

# Temporary files (using files because <(...) is not portable)
tt_temp_dir=
tt_make_temp_dir # sets global $tt_temp_dir
tt_temp_file="$tt_temp_dir/temp.txt"
tt_stdin_file="$tt_temp_dir/stdin.txt"
tt_test_ok_file="$tt_temp_dir/ok.txt"
tt_test_output_file="$tt_temp_dir/output.txt"

# Some preparing command to run before all the tests?
if test -n "$tt_pre_command"; then
eval "$tt_pre_command" ||
Expand Down