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

Enable testing with out-of-tree builds #692

Merged
merged 10 commits into from
Dec 27, 2023

Conversation

PhilMiller
Copy link
Contributor

@PhilMiller PhilMiller commented Dec 27, 2023

Being able to build the code and run tests successfully should not depend on the build tree being an immediate child of the repository root. This PR makes changes necessary to lift that assumption wherever it appears in the current code.

Changes

  • Symlink to the extern directory inside the build tree, so that the tests don't need to hunt for it
  • Relocate where pybind11 gets built inside the build tree, to make room for that extern symlink
  • Change the tests to use that link to extern rather than hunting for the repo root and looking for it there
  • Also change the Python-using tests to assume any relevant venv is active when the test is run, like we did for the main ngen binary

Removals

  • Drop code to hunt for source repo root in tests

Testing

  1. Build in an arbitrary path locally and run tests

Notes

  • There are still lots of other assumptions about working directories and relative paths throughout the tests

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Target Environment support

  • Linux
  • macOS

@PhilMiller PhilMiller changed the title Phil/out of tree testing Enable testing with out-of-tree builds Dec 27, 2023
@PhilMiller PhilMiller marked this pull request as ready for review December 27, 2023 19:05
@program-- program-- merged commit 26985e9 into NOAA-OWP:master Dec 27, 2023
19 checks passed
@PhilMiller PhilMiller deleted the phil/out-of-tree-testing branch December 27, 2023 22:59
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.

2 participants