|
52 | 52 | # pyre currently does not check these assertions
|
53 | 53 | pyright python/tests/test_python_actors.py
|
54 | 54 |
|
55 |
| - # Run GPU Python tests |
56 |
| - LC_ALL=C pytest python/tests/ -s -v -m "not oss_skip" |
| 55 | + # Run GPU Python tests split into 10 groups sequentially |
| 56 | + # Each group runs separately with process cleanup in between |
| 57 | + pip install pytest-split |
| 58 | + FAILED_GROUPS=() |
| 59 | +
|
| 60 | + for GROUP in {1..10}; do |
| 61 | + echo "Running test group $GROUP of 10..." |
| 62 | +
|
| 63 | + # Kill any existing Python processes to ensure clean state |
| 64 | + echo "Cleaning up Python processes before group $GROUP..." |
| 65 | + pkill -9 python || true |
| 66 | + pkill -9 pytest || true |
| 67 | +
|
| 68 | + # Wait a moment for processes to terminate |
| 69 | + sleep 2 |
| 70 | +
|
| 71 | + # Run tests for this group |
| 72 | + if LC_ALL=C pytest python/tests/ -s -v -m "not oss_skip" \ |
| 73 | + --ignore-glob="**/meta/**" \ |
| 74 | + --dist=no \ |
| 75 | + --group=$GROUP \ |
| 76 | + --splits=10; then |
| 77 | + echo "✓ Test group $GROUP completed successfully" |
| 78 | + else |
| 79 | + FAILED_GROUPS+=($GROUP) |
| 80 | + echo "✗ Test group $GROUP failed with exit code $?" |
| 81 | + fi |
| 82 | +
|
| 83 | + done |
| 84 | +
|
| 85 | + # Final cleanup after all groups |
| 86 | + echo "Final cleanup of Python processes..." |
| 87 | + pkill -9 python || true |
| 88 | + pkill -9 pytest || true |
| 89 | +
|
| 90 | + # Check if any groups failed and exit with appropriate code |
| 91 | + if [ ${#FAILED_GROUPS[@]} -eq 0 ]; then |
| 92 | + echo "✓ All test groups completed successfully!" |
| 93 | + else |
| 94 | + echo "✗ The following test groups failed: ${FAILED_GROUPS[*]}" |
| 95 | + echo "Failed groups count: ${#FAILED_GROUPS[@]}/10" |
| 96 | + exit 1 |
| 97 | + fi |
57 | 98 | # TODO(meriksen): temporarily disabled to unblock lands while debugging
|
58 | 99 | # mock CUDA issues on the OSS setup
|
59 | 100 | # python python/tests/test_mock_cuda.py
|
0 commit comments