Validating Configuration
This guide covers validating your .firmwareci configuration and understanding the basic structure of DUTs and workflows.
Prerequisites
.firmwareciinfrastructure initialized (see Repository Setup)
Validation
The fwci CLI validates the content of the .firmwareci directory. Execute the command in the repository’s parent directory or provide a path as an argument:
Output shows detailed validation results per file:
Example of a failed validation:
Run validation regularly after making changes.
Understanding DUT Configuration
The DUT (Device Under Test) configuration defines the target device for your tests. The generated dut.yaml describes an example DUT without hardware:
| Field | Description |
|---|---|
| name | Display name of the created DUT configuration. |
| label | Label for the DUT configuration. Workflows that reference the same label will run their tests on the DUT. |
| reservation-system | How FirmwareCI reserves the DUT for a job. mock reserves nothing, so the example workflow runs without hardware. Use dutctl for a board connected to a dutagent. |
| attributes | Key-value pairs describing additional properties of the DUT. These properties can be templated in tests using [[attributes.value]]. |
To test on a real board, replace the example DUT as described in Connecting Hardware with dutctl. For comprehensive details, refer to the DUT Configuration documentation.
Understanding Workflow Configuration
The workflow configuration is located in the workflows directory with the main configuration in workflow.yaml:
| Field | Description |
|---|---|
| name | Display name of the workflow. |
| description | Brief description of what the workflow does. |
| runs-on | Label of the DUT that this workflow will run on. This should match the DUT’s label. |
For comprehensive details, refer to the Workflow Configuration documentation.
Understanding Test Files
The example test file demonstrates the basic structure:
This test executes a simple echo Hello, World! command within the local testing environment, without interacting with the DUT.
For comprehensive details, refer to the Test Files documentation.
Next Steps
Now that you understand the basic configuration structure, connect your board as described in Connecting Hardware with dutctl, then proceed to Writing a Simple Boot Test to create a real test that interacts with your DUT.
For more advanced topics, see:
- DUT Configuration - Complete DUT configuration reference
- Workflow Configuration - Complete workflow configuration reference
- Test Files - Complete test file reference
- Templating & Variables - Using templates in your tests