Repository navigation
fix(new): write every source the generated build.yaml declares - #168
Merged
Merged
Conversation
Each template's build.yaml declares a test target built from tests/test_main.c, and each template ships test_main.c.template, but "ebuild new" never copied it. The first "ebuild build" of a new project stopped in ninja with "missing and no known rule to make it". The safety-critical template had its test target under the firmware: mapping, which made it invalid YAML. It now sits in targets:. test_new_scaffold.py creates a project from all six templates and checks that every source the build.yaml declares exists. Fixes #167
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #167
Summary
ebuild newnow writestests/test_main.cfrom each template'stest_main.c.template, and creates parent directories as needed.templates/safety-critical/build.yaml.template: the test target now sits undertargets:. Before, it was underfirmware:, which is invalid YAML.tests/unit/test_new_scaffold.py, parametrized over all 6 templates. It checks that everysources:entry in the generatedbuild.yamlexists and that no{{...}}placeholders are left in the test source.Evidence (Ubuntu 20.04 WSL2, Python 3.12.14)
tests/test_main.c, 1 YAMLParserError). On this branch: 6 passed.ruff checkon the changed files: clean.Scope / not in this PR
After this fix,
ebuild buildfor--board stm32f4gets past ninja's missing-input error and reaches the link step. The link step still fails on a host build:eos_port_enter_criticalhas no host port, and eos master does not compile (eos#147, fixed by eos#144). Those are separate issues.