Skip to content

Commit f2f877c

Browse files
committed
Fix clear_out() not deleting files in cmdTests
Shell wildcards are not expanded when quoted, and thus the contents of the temporary output directories were never being cleared. One of the tests in bootstrapCmdTests had to be fixed as a result, since it was relying on a TASTy file created by a previous test still existing in the $OUT directory after having been cleared.
1 parent e64d3d1 commit f2f877c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

project/scripts/bootstrapCmdTests

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ clear_out "$OUT"
3737
# check that `scalac -from-tasty` compiles and `scala` runs it
3838
echo "testing ./bin/scalac -from-tasty and scala -classpath"
3939
clear_out "$OUT1"
40+
./bin/scalac "$SOURCE" -d "$OUT"
4041
./bin/scalac -from-tasty -d "$OUT1" "$OUT/$TASTY"
4142
./bin/scala -classpath "$OUT1" "$MAIN" > "$tmp"
4243
test "$EXPECTED_OUTPUT" = "$(cat "$tmp")"

project/scripts/cmdTestsCommon.inc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ tmp=$(mktemp)
1515
clear_out()
1616
{
1717
local out="$1"
18-
rm -rf "$out/*"
18+
rm -rf "$out"/*
1919
}

0 commit comments

Comments
 (0)