retest-output now moves over panics and errors into the output-retested file
#!/usr/bin/env bash
set -euo pipefail
+truncate -s 0 output-retested
+
# find errors / panics
panic=0
error=0
join=0
-grep "Panic caught. Pattern: " output && panic=1
-grep "Couldn't convert pattern to UTF-8. Err: " output && error=1
-grep "Joined thread: " output && join=1
+grep "Panic caught. Pattern: " output | tee -a output-retested && panic=1
+grep "Couldn't convert pattern to UTF-8. Err: " output | tee -a output-retested && error=1
+grep "Joined thread: " output | tee -a output-retested && join=1
if [ $panic -eq 1 -o $error -eq 1 -o $join -eq 1 ]; then
echo "Panics / Errors found and printed above. Press return to continue..."
@@ -15,4 +17,4 @@ if [ $panic -eq 1 -o $error -eq 1 -o $join -eq 1 ]; then
fi
cargo rustc --release -- -C target-cpu=native
-grep 'pattern: "' < output | sed 's/pattern: "\(.*\)"/\1/' | RUST_BACKTRACE=1 ./target/release/fuzzer --retest | tee output-retested
+grep 'pattern: "' < output | sed 's/pattern: "\(.*\)"/\1/' | RUST_BACKTRACE=1 ./target/release/fuzzer --retest | tee -a output-retested
