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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user