-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
44 lines (36 loc) · 1.04 KB
/
test.sh
File metadata and controls
44 lines (36 loc) · 1.04 KB
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
42
43
#!/bin/bash
# Test script for Mini Agent Platform
# This script runs all tests with proper configuration
# Usage: ./test.sh [test_file] [options]
set -e
echo "=========================================="
echo "Mini Agent Platform - Running Tests"
echo "=========================================="
echo ""
# Activate virtual environment
if [ ! -d ".venv" ]; then
echo "ERROR: Virtual environment not found!"
echo " Please run ./setup.sh first"
exit 1
fi
echo "Activating virtual environment..."
source .venv/bin/activate 2>/dev/null || . .venv/Scripts/activate 2>/dev/null
# Run tests
echo ""
echo "Running tests..."
echo ""
# If a specific test file is provided, run it; otherwise run all tests
if [ $# -gt 0 ]; then
TEST_FILE=$1
shift
echo " Running: $TEST_FILE"
pytest tests/$TEST_FILE -v --tb=short "$@"
else
echo " Running all tests..."
pytest tests/ -v --tb=short "$@"
fi
echo ""
echo "=========================================="
echo "Tests completed!"
echo "=========================================="
echo ""