mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-04-29 17:20:21 -05:00
Critical fixes: 1. bin/tito now uses sys.exit(main()) to propagate exit codes - Previously the exit code was discarded, causing CI to pass even on failures 2. Collection errors are now counted and displayed - 'ERROR tests/...' lines (collection failures) are now tracked - Summary shows 'X errors, Y failed, Z passed' for clarity Without these fixes, CI stages could show green even when tests failed.
28 lines
597 B
Python
Executable File
28 lines
597 B
Python
Executable File
#!/usr/bin/env python3
|
|
"""
|
|
TinyTorch CLI wrapper - runs tito without requiring pip install.
|
|
|
|
Usage:
|
|
./bin/tito <command> [options]
|
|
|
|
Example:
|
|
./bin/tito dev preflight --ci
|
|
"""
|
|
import os
|
|
import sys
|
|
|
|
# Determine tinytorch root from this script's location
|
|
tinytorch_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
# Add to Python path so imports work
|
|
sys.path.insert(0, tinytorch_root)
|
|
|
|
# Change to tinytorch directory so Path.cwd() works correctly
|
|
os.chdir(tinytorch_root)
|
|
|
|
# Import and run main
|
|
from tito.main import main
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|