minor updates to -O gen-C++ maintenance notes and scripts

This commit is contained in:
Vern Paxson 2023-09-27 15:56:31 -07:00
parent cbc3d9c739
commit 417a99ed0d
2 changed files with 14 additions and 7 deletions

View file

@ -30,18 +30,20 @@ The maintenance workflow:
compiler that you'll want to subsequent run against the test suite, compiler that you'll want to subsequent run against the test suite,
per the following. per the following.
2. Run "find-test-files.sh" to generate a list (to stdout) of all of the 2. "mkdir CPP-test" - a directory for holding results relating to C++ testing
3. Run "find-test-files.sh" to generate a list (to stdout) of all of the
possible Zeek source files found in the test suite. possible Zeek source files found in the test suite.
3. For each such Zeek file, run "check-zeek.sh" to see whether Zeek can 4. For each such Zeek file, run "check-zeek.sh" to see whether Zeek can
parse it. This helps remove from further consideration difficult parse it. This helps remove from further consideration difficult
tests (like those that have embedded input files, or multiple separate tests (like those that have embedded input files, or multiple separate
scripts). scripts). Each run writes a report into CPP-test/cz.* file.
4. "mkdir CPP-test" - a directory for holding results relating to C++ testing This step is parallelizable, say using xargs -P 10 -n 1.
5. Run "check-CPP-gen.sh" for each Zeek file that passed "check-zeek.sh". 5. Run "check-CPP-gen.sh" for each Zeek file that passed "check-zeek.sh".
This will generate a corresponding file in CPP-test/out* indicating whether This will generate a corresponding file in CPP-test/out.* indicating whether
"-O gen-C++" can successfully run on the input. Presently, it should "-O gen-C++" can successfully run on the input. Presently, it should
be able to do so for all of them except a few that have conditional code, be able to do so for all of them except a few that have conditional code,
which I've left active (no @TEST-REQUIRES to prune) given hopes of which I've left active (no @TEST-REQUIRES to prune) given hopes of

View file

@ -1,4 +1,9 @@
#! /bin/sh #! /bin/sh
/bin/echo -n $1" " abbr=$(echo $1 | sed 's,\.\./,,;s,/,#,g')
(src/zeek --parse-only $1 >/dev/null 2>&1 && echo "success") || echo "fail" out=CPP-test/cz.$abbr
(
/bin/echo -n $1" "
(src/zeek --parse-only $1 >/dev/null 2>&1 && echo "success") || echo "fail"
) >$out