Fix issue 129: Use TEST_TEMP_DIR instead of /tmp for test output files

Replace hardcoded /tmp/drharness_output.txt with $TEST_TEMP_DIR/drharness_output.txt
in all test files. Tests should only write to subfiles/directories of the working
directory (which is already a temp directory created by run_test.sh).
This commit is contained in:
2026-06-02 17:09:32 -05:00
parent cec6c72ecd
commit 41b49aeeae
21 changed files with 42 additions and 42 deletions
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
+2 -2
View File
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
+2 -2
View File
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
+2 -2
View File
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
+2 -2
View File
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
+2 -2
View File
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test
+2 -2
View File
@@ -3,13 +3,13 @@
# Helper function to run drharness and capture output to a temp file
run_drharness() {
"$DRHARNESS" "$@" > /tmp/drharness_output.txt 2>&1
"$DRHARNESS" "$@" > "$TEST_TEMP_DIR/drharness_output.txt" 2>&1
return $?
}
# Helper to get the output
get_output() {
cat /tmp/drharness_output.txt
cat "$TEST_TEMP_DIR/drharness_output.txt"
}
# Helper to reset editor state for each test