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

Fix restart tests for FreeBSD #4416

Merged
merged 2 commits into from
Jan 25, 2023
Merged

Fix restart tests for FreeBSD #4416

merged 2 commits into from
Jan 25, 2023

Conversation

prckent
Copy link
Contributor

@prckent prckent commented Jan 24, 2023

Proposed changes

Use /usr/bin/env to find bash. On my install it is not /bin/bash, so the unmodified tests fail on attempting to run the check.sh scripts. We use env in a few other places already but are not consistent. With this fix ctest -L deterministic works for me on FreeBSD 13.1

What type(s) of changes does this code introduce?

  • Bugfix
  • Build related changes
  • Testing changes (e.g. new unit/integration/performance tests)

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

FreeBSD 13.1 virtual machine

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'
  • NA. Code added or changed in the PR has been clang-formatted
  • NA. This PR adds tests to cover any new code, or to catch a bug that is being fixed
  • NA. Documentation has been added (if appropriate)

@ye-luo
Copy link
Contributor

ye-luo commented Jan 25, 2023

To my best knowledge, we are not relying on "/usr/bin/env" even it exists in quite many python scripts. The final robust solution we picked was to specify the interpreter in the command line. I feel better to use find_program(BASH bash /bin /usr/bin. If bash is not found, we error out immediately.

@prckent
Copy link
Contributor Author

prckent commented Jan 25, 2023

This PR makes things work ahead of 3.16.0 release.

I did look through the repo and noticed that we have a variety of #shell invocations on top of whatever CMake is invoking at different points. It would help to have a discussion, put the conclusion in the developer guide, and then make things consistent. There are also inconsistencies in how python is handled between QMCPACK and NEXUS that can trip up a user...

@ye-luo
Copy link
Contributor

ye-luo commented Jan 25, 2023

There are also inconsistencies in how python is handled between QMCPACK and NEXUS that can trip up a user...

could you elaborate the issue? QMCPACK dependency on python is short lived. Only during building and testing. Are you saying when running nexus tests, different python installations can be potentially pulled in? If this issue is not documented, let us put up an issue.

If you refer to users adopting a different python for nexus in production use, I assume they are at responsible.

@ye-luo ye-luo enabled auto-merge January 25, 2023 01:25
@ye-luo
Copy link
Contributor

ye-luo commented Jan 25, 2023

Test this please

@ye-luo ye-luo merged commit d574bad into QMCPACK:develop Jan 25, 2023
@prckent prckent deleted the bsdfix branch September 19, 2024 21:44
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