Fix research
This commit is contained in:
37
scripts/check_syntax.sh
Executable file
37
scripts/check_syntax.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
# Godot Syntax Checker
|
||||
# Usage: ./scripts/check_syntax.sh <script_path>
|
||||
# Example: ./scripts/check_syntax.sh res://tests/test_gold_mine_click.gd
|
||||
|
||||
SCRIPT="$1"
|
||||
GODOT_BIN="${GODOT_BIN:-godot}"
|
||||
|
||||
if [ -z "$SCRIPT" ]; then
|
||||
echo "Usage: $0 <script_path>"
|
||||
echo "Example: $0 res://tests/test_gold_mine_click.gd"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$SCRIPT" ]; then
|
||||
echo "Error: Script not found: $SCRIPT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "=========================================="
|
||||
echo "Checking syntax: $SCRIPT"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
|
||||
"$GODOT_BIN" --headless --path . --check-only --script "$SCRIPT"
|
||||
EXIT_CODE=$?
|
||||
|
||||
echo ""
|
||||
echo "=========================================="
|
||||
if [ $EXIT_CODE -eq 0 ]; then
|
||||
echo "✓ Syntax valid"
|
||||
else
|
||||
echo "✗ Syntax errors found"
|
||||
fi
|
||||
echo "=========================================="
|
||||
|
||||
exit $EXIT_CODE
|
||||
26
scripts/run_all.sh
Executable file
26
scripts/run_all.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# Godot Test Runner - All Tests
|
||||
# Usage: ./scripts/run_all.sh
|
||||
|
||||
set -e
|
||||
|
||||
GODOT_BIN="${GODOT_BIN:-godot}"
|
||||
|
||||
echo "=========================================="
|
||||
echo "Running All Tests"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
|
||||
"$GODOT_BIN" --headless --path . -s res://tests/test_runner.gd
|
||||
EXIT_CODE=$?
|
||||
|
||||
echo ""
|
||||
echo "=========================================="
|
||||
if [ $EXIT_CODE -eq 0 ]; then
|
||||
echo "✓ All tests passed"
|
||||
else
|
||||
echo "✗ Some tests failed"
|
||||
fi
|
||||
echo "=========================================="
|
||||
|
||||
exit $EXIT_CODE
|
||||
39
scripts/run_test.sh
Executable file
39
scripts/run_test.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
# Godot Test Runner - Single Test
|
||||
# Usage: ./scripts/run_test.sh <test_script_path>
|
||||
# Example: ./scripts/run_test.sh res://tests/test_gold_mine_click.gd
|
||||
|
||||
set -e
|
||||
|
||||
TEST_SCRIPT="$1"
|
||||
GODOT_BIN="${GODOT_BIN:-godot}"
|
||||
|
||||
if [ -z "$TEST_SCRIPT" ]; then
|
||||
echo "Usage: $0 <test_script_path>"
|
||||
echo "Example: $0 res://tests/test_gold_mine_click.gd"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$TEST_SCRIPT" ]; then
|
||||
echo "Error: Test script not found: $TEST_SCRIPT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "=========================================="
|
||||
echo "Running test: $TEST_SCRIPT"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
|
||||
"$GODOT_BIN" --headless --path . -s "$TEST_SCRIPT"
|
||||
EXIT_CODE=$?
|
||||
|
||||
echo ""
|
||||
echo "=========================================="
|
||||
if [ $EXIT_CODE -eq 0 ]; then
|
||||
echo "✓ Test passed"
|
||||
else
|
||||
echo "✗ Test failed with exit code: $EXIT_CODE"
|
||||
fi
|
||||
echo "=========================================="
|
||||
|
||||
exit $EXIT_CODE
|
||||
Reference in New Issue
Block a user