You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add separate Preferences test group with FastLapack algorithm verification
This commit implements a comprehensive testing approach for the dual preference
system by creating a separate CI test group that verifies algorithm selection
before and after extension loading, specifically testing FastLapack preferences.
## New Test Architecture
### **Separate Preferences Test Group**
- Created `test/preferences.jl` with isolated preference testing
- Added "Preferences" to CI matrix in `.github/workflows/Tests.yml`
- Added Preferences group logic to `test/runtests.jl`
- Removed preference tests from `default_algs.jl` to avoid package conflicts
### **FastLapack Algorithm Selection Testing**
- Tests preference system with FastLUFactorization as always_loaded algorithm
- Verifies behavior when RecursiveFactorization not loaded (should use always_loaded)
- Tests extension loading scenarios to validate best_algorithm vs always_loaded logic
- Uses FastLapack because it's slow and normally never chosen (perfect test case)
### **Extension Loading Verification**
- Tests algorithm selection before extension loading (baseline behavior)
- Tests conditional FastLapackInterface loading (always_loaded preference)
- Tests conditional RecursiveFactorization loading (best_algorithm preference)
- Verifies robust fallback when extensions unavailable
## Key Test Scenarios
### **Preference Behavior Testing**
```julia
# Set preferences: RF as best, FastLU as always_loaded
best_algorithm_Float64_medium = "RFLUFactorization"
best_always_loaded_Float64_medium = "FastLUFactorization"
# Test progression:
1. No extensions → use heuristics
2. FastLapack loaded → should use FastLU (always_loaded)
3. RecursiveFactorization loaded → should use RF (best_algorithm)
```
### **Algorithm Choice Verification**
- ✅ Tests explicit algorithm selection with `defaultalg()`
- ✅ Verifies tiny matrix override (≤10 elements → GenericLU)
- ✅ Tests size boundary logic across multiple matrix sizes
- ✅ Confirms preference storage and retrieval infrastructure
## CI Integration
### **New Test Group Structure**
- **Core**: Basic algorithm tests without preference complexity
- **Preferences**: Isolated preference system testing with extension loading
- **All**: Excludes Preferences to avoid package loading conflicts
### **Clean Test Isolation**
- Preferences test group runs independently with minimal package dependencies
- Proper preference cleanup ensures no state leakage between tests
- Conditional extension loading handles missing packages gracefully
## Expected Benefits
1. **Robust Preference Testing**: Isolated environment tests actual preference behavior
2. **Extension Loading Verification**: Tests before/after extension scenarios
3. **Clean CI Separation**: Avoids package conflicts in main test suite
4. **FastLapack Validation**: Uses naturally slow algorithm to verify preferences work
This architecture provides comprehensive testing of the dual preference system
while maintaining clean separation and avoiding CI complexity issues.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
0 commit comments