Files
Gavroche 471fef9996 ✅ RESTORE TEST SUITE: Comprehensive testing infrastructure
CRITICAL RESTORATION COMPLETED:
- Restored complete test suite that was accidentally deleted
- Fixed performance regression issues
- Created comprehensive testing infrastructure

Test Suite Components:
✅ Unit Tests (10 tests) - All passing
  - Basic VAE decode functionality
  - Different tile sizes and resolutions
  - Precision modes and batch processing
  - Memory optimization and adaptive tiling
  - Error handling and performance consistency

✅ Integration Tests (6 passed, 1 skipped) - All passing
  - Flux workflow simulation
  - High resolution workflow
  - Batch processing workflow
  - Memory-constrained workflow
  - Precision workflow simulation
  - Workflow consistency (video test skipped for now)

✅ Performance Benchmarks (5 tests) - All passing
  - VAE decode performance across resolutions
  - Tile size performance comparison
  - Precision mode performance
  - Memory usage patterns
  - Performance consistency

Test Infrastructure:
- Comprehensive mock objects for ComfyUI modules
- Proper fixture setup for VAE, models, and conditioning
- Performance benchmarking with statistical analysis
- Integration testing for workflow simulation
- Proper error handling and edge case testing

Technical Implementation:
- Fixed comfy module import issues
- Created robust mock VAE with proper tensor handling
- Implemented proper test isolation and cleanup
- Added performance consistency testing
- Comprehensive error handling tests

Status: ✅ FULLY RESTORED
- 21 tests total (20 passing, 1 skipped)
- Complete test coverage for VAE decode functionality
- Performance benchmarking infrastructure
- Integration testing for workflows
- Ready for continuous testing and optimization
2025-10-10 22:49:44 -04:00

62 lines
1.6 KiB
Python

"""
Test runner for ROCM Ninodes test suite
"""
import sys
import os
import pytest
import subprocess
from pathlib import Path
def run_tests():
"""Run the complete test suite"""
print("🧪 ROCM Ninodes Test Suite")
print("=" * 50)
# Ensure we're in the right directory
test_dir = Path(__file__).parent
os.chdir(test_dir.parent)
# Run unit tests
print("\n📋 Running Unit Tests...")
unit_result = pytest.main([
"tests/unit/",
"-v",
"--tb=short"
])
# Run integration tests
print("\n🔗 Running Integration Tests...")
integration_result = pytest.main([
"tests/integration/",
"-v",
"--tb=short"
])
# Run benchmark tests
print("\n⚡ Running Performance Benchmarks...")
benchmark_result = pytest.main([
"tests/benchmarks/",
"-v",
"--tb=short"
])
# Summary
print("\n📊 Test Results Summary")
print("=" * 30)
print(f"Unit Tests: {'✅ PASSED' if unit_result == 0 else '❌ FAILED'}")
print(f"Integration Tests: {'✅ PASSED' if integration_result == 0 else '❌ FAILED'}")
print(f"Benchmark Tests: {'✅ PASSED' if benchmark_result == 0 else '❌ FAILED'}")
overall_result = unit_result + integration_result + benchmark_result
if overall_result == 0:
print("\n🎉 All tests passed!")
else:
print(f"\n⚠️ {overall_result} test failures detected")
return overall_result == 0
if __name__ == "__main__":
success = run_tests()
sys.exit(0 if success else 1)