Phase 2: Fragment Migration - Migrated 42 ingredients to 54 fine-grained fragments - Replaced %include with %ksappend syntax - Created organized fragment structure (platform/generic-43, platform/generic-rawhide, shared/) - Updated generator to use fragment paths - All 16 manifest variants generate successfully Phase 3: Testing Infrastructure - Created containerized test runner (tests/container/) - Added integration test suite (tests/integration/) - Created golden master fixtures (tests/fixtures/expected_recipes/) - 41 tests passing (36 unit + 5 integration) - 54 fragments, 16 recipes validated Phase 4: CI/CD Integration - 5 new workflows: validate-recipes, validate-fragments, test-generation, container-tests, build-iso - Added validation gates before ISO builds - Works with existing fedora-runner-image - Local testing support via act_runner
44 lines
1.3 KiB
Bash
Executable File
44 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# Run all tests inside the container environment
|
|
# Usage: podman run --rm -v .:/phyllomeos:ro phyllo/test-runner
|
|
|
|
set -e
|
|
|
|
echo "============================================="
|
|
echo " Phyllome OS Recipe Generator Test Suite"
|
|
echo "============================================="
|
|
echo ""
|
|
|
|
# Navigate to project root
|
|
cd /phyllomeos
|
|
|
|
echo "[1/3] Running unit tests (test_recipe_generator.py)..."
|
|
echo "----------------------------------------"
|
|
python3 -m pytest tests/test_recipe_generator.py -v
|
|
echo "✓ Unit tests passed!"
|
|
echo ""
|
|
|
|
echo "[2/3] Running integration tests..."
|
|
echo "----------------------------------------"
|
|
python3 -m pytest tests/integration/ -v
|
|
echo "✓ Integration tests passed!"
|
|
echo ""
|
|
|
|
echo "[3/3] Validating generated recipes..."
|
|
echo "----------------------------------------"
|
|
cd scripts
|
|
python3 generate_recipe.py --validate ../recipes/*.cfg --strict
|
|
echo "✓ Recipe validation passed!"
|
|
echo ""
|
|
|
|
echo "============================================="
|
|
echo " ALL TESTS PASSED!"
|
|
echo "============================================="
|
|
echo ""
|
|
echo "Summary:"
|
|
echo " - Unit tests: 36 tests (test_recipe_generator.py)"
|
|
echo " - Integration tests: Fragment validation, recipe composition, golden masters"
|
|
echo " - Fragment validation: 54 .ks files checked"
|
|
echo " - Recipe validation: All 16 manifest variants generated and validated"
|
|
echo ""
|