-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-with-persistence.sh
More file actions
executable file
·41 lines (32 loc) · 960 Bytes
/
run-with-persistence.sh
File metadata and controls
executable file
·41 lines (32 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
echo "🚀 STARTING PERSISTENT VS CODE TESTS"
echo "===================================="
echo ""
# Default test file if none provided
TEST_FILE=${1:-"ui-tests/**/*.test.js"}
echo "Test file(s): $TEST_FILE"
echo ""
# Start the improved persistence injector in background
echo "Starting improved persistence system..."
./lib/improvedPersistence.sh &
INJECTOR_PID=$!
echo "Injector PID: $INJECTOR_PID"
echo ""
# Give it a moment to start
sleep 2
# Function to cleanup on exit
cleanup() {
echo ""
echo "Stopping persistence injector..."
kill $INJECTOR_PID 2>/dev/null
wait $INJECTOR_PID 2>/dev/null
echo "✅ Cleanup complete"
}
# Set trap to cleanup on exit
trap cleanup EXIT INT TERM
# Run the tests
echo "Running tests with persistence..."
echo "===================================="
npx extest run-tests "$TEST_FILE" --storage ./vscode-test-persistent -o ./.vscode/settings.test.json
echo ""
echo "✨ Test complete!"