Skip to content

Conversation

@tjfulle
Copy link
Collaborator

@tjfulle tjfulle commented Nov 15, 2025

This PR supersedes #66 and includes all its details. Additionally, it includes a major change to the generation of test cases as described in spec-case.md

- pyt/vvt: use subprocess not runpy.  runpy is still there but
  there is difficulty in properly redirecting output streams that
  needs to be resolved.
- fast/parallel dependency resolver
Copy link
Collaborator

@mdmosby mdmosby left a comment

Choose a reason for hiding this comment

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

Minor things that can wait


@canary.hookimpl(wrapper=True)
def canary_cdash_artifacts(case: canary.TestCase) -> Generator[None, None, list[dict[str, str]]]:
"""Default implementation: return the test case's keywords"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"""Default implementation: return the test case's keywords"""
"""Default implementation: return the test case's artifact specifications"""

Should canary.TestCase use this Schema to validate the artifacts specification?

rparameters: dict[str, int]
assets: list["Asset"]
baseline: list[dict]
artifacts: list[dict[str, str]]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we validate the artifacts Schema as part of post_init?

Comment on lines +177 to +182
artifacts = list(case.spec.artifacts) or []
result = yield
artifacts.extend([_ for _ in result if _])
for i, artifact in enumerate(artifacts):
artifacts[i] = schema.validate(artifact)
return artifacts
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the expected behavior if artifacts include elements with duplicate file values and conflicting when values?

tjfulle and others added 9 commits November 20, 2025 15:03
`Path.hardlink_to` requires that `src` and `dst` are on the same
**filesystem** which is a more-stringent requirement than we've previously
had. Furthermore, `hardlink_to` does not follow copy symantics in that
modifying the hardlinked file _also modifies the source_! Which may be
unexpected behavior when one specifies `copy`.
1. Generator plugins must now implement canary_collect_file_patterns that returns a list of glob patterns
   that the generator recognizes
2. During discovery, we walk the tree and collect all files matching patterns from above
3. After collection, we call another new plugin canary_collect_filter_files.  This plugin can filter
   out files from the list collected.  This is useful for the ctest plugin to remove all but the
   first CTestTestfile in a tree
4. After filtering, create test case generators in parallel.

Additionally, store all generator meta data in a single file.

With the above changes, time to collect generators for a large test suite went from 25-30 seconds to less
than 1 second.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants