This project serves as an integration test suite for the plugins. It's a simple RTICv1 based application running on an atsamd51g19a emulated in Renode.
See the integration test workflow for more details on how we use it in this repository.
The Integration Tests workflow produces a modality data artifact that can be downloaded for local use.
- Install Modality
- Navigate to the latest Integration Tests workflow run in the Actions tab
- Download the tarball artifact (
defmt_test_system_modality_data_$DATETIME.tar.gz
) - Extract it (assuming in
/tmp
) - Run
modalityd
with the extracted data-dir
modalityd --license-key '<YOU_LICENSE_KEY> --data-dir /tmp/modalityd_data
- Setup the user and workspace
modality user auth-token --use $(< /tmp/modalityd_data/user_auth_token)
modality workspace use ci-tests
To run the setup locally, first install the dependencies:
- Modality: https://docs.auxon.io/modality/installation/
- Rust (with target
thumbv7em-none-eabihf
): https://www.rust-lang.org/tools/install - Renode: https://renode.readthedocs.io/en/latest/introduction/installing.html
- renode-run:
cargo install renode-run
- flip-link:
cargo install flip-link
- Install the
defmt
plugins from this repository if not using the ones provided by themodality-reflector
package
Now you run the system with cargo run --release
.
Once it completes, you can import the defmt
data file /tmp/rtt_log.bin
using the importer plugin.
NOTE: If you're using a tarball installation of Modality, then you'll need to update the reflector configuration file to point to
the plugins directory (e.g. if installed to /opt
):
[plugins]
-plugins-dir = '/usr/lib/modality-reflector-plugins'
+plugins-dir = '/opt/modality/modality-reflector-plugins'
modality-reflector import --config config/reflector-config.toml defmt --elf-file target/thumbv7em-none-eabihf/release/atsamd-rtic-firmware /tmp/rtt_log.bin
- Setup new user/workspace
./scripts/setup_modality.sh
- Build the test system
cargo build --release
- Setup the python venv and install dependencies (NOTE: assumes renode is installed in /opt)
./scripts/setup_robot_framework.sh
- Run the robot framework tests
./scripts/run_robot_framework.sh
- Optionally view the report html (assumes firefox)
./scripts/view_report.sh