diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-21 21:27:31 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-21 21:27:31 +0300 |
| commit | 0841f0f9a1e3f3708d8c511a6290344e73607aab (patch) | |
| tree | 4ae7fe60878b693d6975093acb491d977d247acd /test-protocols.sh | |
| parent | ce82046a11521b0537ac2150a07a4de54aec883a (diff) | |
Move test scripts to scripts/ directory and fix simulation completion
- Moved test-protocols.sh, test-quick.sh, test-verbose.sh to scripts/
- Updated references in README.md and docs/testing-guide.md
- Fixed HeadlessSimulationRunner to properly run simulations to completion
- Fixed message delivery timing (now respects 500-2000ms delays)
- Added proper process time synchronization
- Fixed HeadlessProtocolRunner to exit cleanly
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'test-protocols.sh')
| -rwxr-xr-x | test-protocols.sh | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/test-protocols.sh b/test-protocols.sh deleted file mode 100755 index 2edbef9..0000000 --- a/test-protocols.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -# -# DS-Sim Protocol Test Runner -# -# This script runs protocol simulation tests in headless mode. -# GUI decoupling has been implemented, so tests run cleanly without GUI errors. -# - -echo "DS-Sim Protocol Test Runner" -echo "==========================" -echo - -# Check if we're in the right directory -if [ ! -f "pom.xml" ]; then - echo "ERROR: Please run this script from the project root directory" - exit 1 -fi - -# Build if needed -if [ ! -d "target/classes" ]; then - echo "Building project..." - mvn compile -q || { echo "Build failed!"; exit 1; } -fi - -# Menu -echo "Choose an option:" -echo "1) Run all protocol tests" -echo "2) Run specific protocol test" -echo "3) Run tests with detailed logs" -echo "4) Test GUI decoupling (verify no GUI errors)" -echo "5) Exit" -echo - -read -p "Enter choice [1-5]: " choice - -case $choice in - 1) - echo "Running all protocol tests..." - java -cp target/classes:target/test-classes -Djava.awt.headless=true testing.HeadlessProtocolRunner - ;; - 2) - echo "Available simulations:" - ls saved-simulations/*.dat | sed 's/saved-simulations\// - /g' - echo - read -p "Enter simulation name (without .dat): " sim - if [ -f "saved-simulations/${sim}.dat" ]; then - java -cp target/classes:target/test-classes -Djava.awt.headless=true \ - testing.HeadlessProtocolRunner "saved-simulations/${sim}.dat" - else - echo "Simulation not found!" - fi - ;; - 3) - echo "Running tests with detailed logs..." - java -cp target/classes:target/test-classes -Djava.awt.headless=true \ - -Dds.sim.verbose=true testing.HeadlessProtocolRunner - ;; - 4) - echo "Testing GUI decoupling..." - java -cp target/classes:target/test-classes testing.TestNoGuiErrors - ;; - 5) - echo "Exiting..." - exit 0 - ;; - *) - echo "Invalid choice!" - exit 1 - ;; -esac
\ No newline at end of file |
