Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7rnC7jppGGdHGESvy
18 lines
705 B
Bash
Executable File
18 lines
705 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Regenerates every file under output/ : the tests write 01-05, the compiler writes 06.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
rm -f output/*.txt
|
|
|
|
mvn -B -q test
|
|
|
|
javac --release 25 -d /tmp/q18-broken src/broken/Q18Broken.java 2> output/06-q18-compile-error.txt || true
|
|
# keep only the compiler's own diagnostic, not the JAVA_TOOL_OPTIONS banner or the file path prefix
|
|
sed -i -e '/^Picked up JAVA_TOOL_OPTIONS/d' -e 's#^src/broken/##' output/06-q18-compile-error.txt
|
|
|
|
{
|
|
java -version 2>&1 | grep -v '^Picked up' | head -1
|
|
echo "tests: $(grep -h -o 'tests="[0-9]*"' target/surefire-reports/TEST-*.xml | tr -dc '0-9\n' | paste -sd+ | bc)"
|
|
} > output/00-environment.txt
|
|
ls output
|