Repository navigation
test(docker): fail if mkconcore selects a Dockerfile template that doesn't exist - #689
Open
yadavchiragg wants to merge 2 commits into
Open
yadavchiragg wants to merge 2 commits into
yadavchiragg wants to merge 2 commits into
Conversation
mkconcore selects Dockerfile.cpp for .cpp nodes, but the template did not exist, so every docker build of a C++ workflow exited with a misleading 'not correct path to concore' error. Add the template, emit the g++ compile step and CMD like the Verilog path does, and narrow the bare except so a missing template names the actual file. Adds tests.
Parses mkconcore.py for the Dockerfile.<ext> templates it can pick in docker mode and asserts each is present, and compiles sample C++ nodes the way the generated Dockerfile does. This would have caught the missing Dockerfile.cpp.
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.
Why
Dockerfile.cppwas selected by mkconcore.py in docker mode but never existed in the repo, so every C++ docker build failed (fixed in #). CI never noticed because it only builds Dockerfile.py.What
Adds tests/test_docker_templates.py, which runs in the existing
testjob (no Docker daemon needed):Dockerfile.<ext>it can select and asserts each file existsNotes
test_referenced_dockerfile_template_exists[Dockerfile.cpp]fails, so this would have caught the original bug.