tinymux/testcases/tools/BuildAndSmoke
Stephen Dennis ba8d101289 Switch Makesmoke and Smoke to muxscript, fix interactive flag
Makesmoke and Smoke now use muxscript+dbconvert instead of
netmux+expect+telnet. No server process, no port 2860, no expect
dependency. Makesmoke runs in 3s (was ~15s), gdb-friendly.

Fix muxscript ProcessCommand interactive parameter: was false, must
be true. With false, the & command evaluated its RHS (running
rvbench 550K iterations during DB creation). With true, & stores
text literally, matching netmux behavior.

Also: remove early-exit-after-EOF in script_loop — muxscript now
drains the scheduler until @shutdown or queue empty, which is needed
for smoke test @wait/@notify chains.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:50:08 -06:00

33 lines
744 B
Bash
Executable file

#!/bin/bash
#
# BuildAndSmoke — Build, create smoke DB if needed, run smoke tests.
#
# Usage: cd testcases && ./tools/BuildAndSmoke [-f]
#
# -f Force Makesmoke even if smoke.flat is up to date.
#
set -euo pipefail
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
TC=$(cd "$SCRIPT_DIR/.." && pwd)
cd "$TC"
FORCE_MAKESMOKE=false
if [ "${1:-}" = "-f" ]; then
FORCE_MAKESMOKE=true
fi
# Build.
"$SCRIPT_DIR/Build.sh"
# Makesmoke if needed.
if $FORCE_MAKESMOKE || [ ! -f smoke.flat ]; then
"$SCRIPT_DIR/Makesmoke"
elif [ -n "$(find . -maxdepth 1 -name '*.mux' -newer smoke.flat -print -quit 2>/dev/null)" ]; then
"$SCRIPT_DIR/Makesmoke"
else
echo "smoke.flat is up to date (use -f to force)."
fi
# Smoke.
"$SCRIPT_DIR/Smoke"