-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathrun_tests.sh
More file actions
executable file
·51 lines (42 loc) · 1.31 KB
/
Copy pathrun_tests.sh
File metadata and controls
executable file
·51 lines (42 loc) · 1.31 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
44
45
46
47
48
49
50
51
#!/bin/bash
#
# Wrapper script to test all ModelZoo configs
# This script tests that all example configs work correctly with modelmaker.
#
# Usage:
# source ~/.pyenv/versions/py310_tinyml/bin/activate
# ./run_tests.sh [--timeout 2400] [--filter STRING] [--stop-on-error]
#
# Colors
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo "======================================================================"
echo "Tiny ML ModelZoo Test Suite"
echo "======================================================================"
echo ""
# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Check for examples directory
if [ ! -d "$SCRIPT_DIR/examples" ]; then
echo -e "${RED}Error: examples directory not found${NC}"
echo "Expected: $SCRIPT_DIR/examples"
exit 1
fi
echo "Python: $(which python)"
echo "Version: $(python --version)"
echo "Script Dir: $SCRIPT_DIR"
echo ""
# Run the test script with all arguments passed through
echo -e "${YELLOW}Starting tests...${NC}"
echo ""
python "$SCRIPT_DIR/test_all_configs.py" "$@"
exit_code=$?
echo ""
if [ $exit_code -eq 0 ]; then
echo -e "${GREEN}✓ All tests completed successfully${NC}"
else
echo -e "${RED}✗ Some tests failed (exit code: $exit_code)${NC}"
fi
exit $exit_code