Testing is critical to ensuring Terra packages work correctly across different systems and configurations. This guide covers local testing, CI/CD validation, and troubleshooting.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/terrapkg/packages/llms.txt
Use this file to discover all available pages before exploring further.
Why Testing Matters
Proper testing prevents:- Broken packages in the repository
- Dependency conflicts
- Runtime failures
- Security vulnerabilities
- Wasted maintainer time reviewing broken PRs
Local Testing Workflow
Prerequisites
Ensure your testing environment is set up:Build Testing
Check build output
Verify the build completed successfully:You should see:
- Binary RPM(s) in
rpms/x86_64/ - Source RPM in
srpm/
Installation Testing
Multi-Architecture Testing
If you have access to multiple architectures:CI automatically tests both x86_64 and aarch64. Focus on x86_64 locally unless your package has architecture-specific code.
Automated CI Testing
When you submit a PR, GitHub Actions automatically runs:Build Matrix Generation
The CI determines what changed:- Package(s) to build
- Architectures (x86_64, aarch64)
- Build labels (mock, large, etc.)
Package Building
Each package is built in an isolated container:- Install build dependencies
- Build with anda
- Generate artifacts
- Upload RPMs
AppStream Generation
For GUI applications, AppStream metadata is generated:Check the CI summary for AppStream warnings about missing metadata in desktop applications.
Monitoring CI Builds
Viewing Build Status
- Go to your PR on GitHub
- Click the “Checks” tab
- View build progress for each job
Understanding CI Output
Build Jobs
One job per package + architecture:
- Install Build Dependencies
- Build with Andaman
- Upload artifacts
- Publish to repository (on push to frawhide)
Common CI Failures
Build dependency installation failed
Build dependency installation failed
Cause: Missing or incorrect BuildRequiresFix:Test locally:
Build failed with compiler errors
Build failed with compiler errors
Cause: Source incompatibility, missing patches, wrong flagsFix:
- Check upstream build instructions
- Add necessary patches
- Adjust build flags in %build section
File not found in %files
File not found in %files
Cause: File path wrong or file not installedFix:Update %files to match actual paths.
sccache failures
sccache failures
Cause: Caching issues with incremental buildsFix: Disable sccache for this package:
Architecture-specific failures
Architecture-specific failures
Cause: Code not portable or missing arch-specific depsFix: Add architecture conditionals:
Integration Testing
Testing with Dependent Packages
If your package is a library or dependency:Testing in Clean Environment
Use a container or VM:Performance Testing
Build Performance
Monitor build times:- Enabling parallel builds (
-j%{?_smp_mflags}) - Using faster linkers (mold for Rust/C++)
- Adding
large = 1label for bigger runners
Runtime Performance
Benchmark critical operations:Security Testing
Check Binary Security Features
Scan for Vulnerabilities
Regression Testing
When updating packages:Document current behavior
Before updating, note:
- Current version and features
- Known working use cases
- Configuration files and formats
Testing Checklist
Before submitting your PR:Build Tests
- Package builds successfully on x86_64
- Package builds successfully on aarch64 (or CI passes)
- No rpmlint errors (warnings reviewed)
- All files have correct paths and permissions
- Source RPM can be rebuilt
Installation Tests
- Package installs without errors
- All dependencies resolve correctly
- No file conflicts with other packages
- Scriptlets execute successfully
Functionality Tests
- Main program/library works as expected
- Help/version commands work (CLI tools)
- GUI launches without errors (GUI apps)
- Services start and run correctly (daemons)
- Configuration files load properly
Integration Tests
- Upgrades from previous version work
- Removal cleans up correctly
- Dependent packages still work (if library)
- No regressions from previous behavior
Documentation Tests
- Man pages display correctly (if included)
- README and docs are readable
- License files are present
- Changelog is updated
Manual Test Report Template
Include in your PR description:Debugging Failed Tests
Enable Verbose Output
Interactive Build Debugging
Check Build Logs
Getting Help with Testing
If you encounter testing issues:- Check similar packages - See how similar packages are tested
- Review CI logs - Often contain helpful error messages
- Ask in community chat - Join our chats
- Search issues - Someone may have had the same problem
Next Steps
Package Guidelines
Review packaging best practices
Getting Started
Back to contribution basics