Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit test for recipe coverage #1676

Merged
merged 2 commits into from
Dec 12, 2023
Merged

unit test for recipe coverage #1676

merged 2 commits into from
Dec 12, 2023

Conversation

kostmo
Copy link
Member

@kostmo kostmo commented Dec 6, 2023

Towards #1268

Demo

scripts/run-tests.sh --test-arguments '--pattern "Recipe coverage"'

@kostmo kostmo marked this pull request as ready for review December 6, 2023 18:38
@kostmo kostmo requested a review from byorgey December 6, 2023 18:39
Copy link
Member

@byorgey byorgey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, this is a great idea.

Sorry I've been unresponsive recently, I've been slammed with end-of-the-semester grading and student meetings.

test/unit/TestRecipeCoverage.hs Outdated Show resolved Hide resolved
@kostmo kostmo force-pushed the feature/recipe-coverage branch from 95a2f0e to 0c5d1d3 Compare December 12, 2023 15:21
@kostmo kostmo added the merge me Trigger the merge process of the Pull request. label Dec 12, 2023
@mergify mergify bot merged commit 36a0046 into main Dec 12, 2023
9 checks passed
@mergify mergify bot deleted the feature/recipe-coverage branch December 12, 2023 15:32
mergify bot pushed a commit that referenced this pull request Jul 13, 2024
* Use the recipe graph to find unreachable entities instead of only looking for recipes for devices.
  * Improves on #1676.
* Add yielded entities in the recipe graph
* Add a test for each entity.

Before:
```
   Recipe coverage
    Ensure all devices have recipes (#1268):                                            FAIL (expected: Need to come up with more recipes)
      test/unit/TestRecipeCoverage.hs:36:
      Missing recipes for: "Elmer's glue", "binoculars", "blueprint", "caliper", "decoder ring", "dozer blade", "hourglass", "lambda", "linotype", "olfactometer", "rolex", "tape drive", and "wedge" (expected failure)
```
After
```
  Ensure all entities have recipes
    3D printer:                   OK
    ADT calculator:               OK
    Elmer's glue:                 FAIL (expected: More recipes needed (#1268))
      test/integration/TestRecipeCoverage.hs:34:
      Can not make "Elmer's glue" from starting entities. (expected failure)
    [... 100 more entities ...]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process of the Pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants