Skip to content

QMCPACK Update Nov2019#13832

Merged
adamjstewart merged 9 commits intospack:developfrom
naromero77:QMCPACKUpdateNov2019
Nov 27, 2019
Merged

QMCPACK Update Nov2019#13832
adamjstewart merged 9 commits intospack:developfrom
naromero77:QMCPACKUpdateNov2019

Conversation

@naromero77
Copy link
Copy Markdown
Contributor

Mostly a minor update:

  • Fix conflicts
  • Fix variants
  • Update QMCPACK testing option

@adamjstewart
Copy link
Copy Markdown
Member

Need to replace setup_environment with setup_run_environment

@run_after('build')
@on_package_attributes(run_tests=True)
def check(self):
def check_install(self):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why was this renamed? Actually, CMakePackage already runs check by default during test time, so if you change it back to check you should be able to remove the run_after and on_package_attributes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

check did not seem to do anything anymore, so I changed it to check_install because I grepped through some packages and found an example similar to the one I had.

You are saying to get rid of the decorators and just do check and it will run after the build -- and if the build fails, it will not install. correct?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Correct. You can test this with spack install --test=root qmcpack to make sure I'm right.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, your suggested modifications are not working. check is doing nothing.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm having trouble reproducing this. I tried messing with a simpler package with fewer dependencies. I tried building with and without overriding check, and with and without extending CudaPackage, but it always builds tests when I ask it to. What version of Python are you using to run Spack?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

--test=root and --run-tests should be equivalent, are you testing this on develop? If you want to run both make check and your custom unit tests, your current approach is fine, or you can add make check to your custom function and override the default check.

Copy link
Copy Markdown
Member

@adamjstewart adamjstewart Nov 27, 2019

Choose a reason for hiding this comment

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

I also tried combining the decorators with the custom check method and it successfully overrides the builtin check method when I use --test=root. It actually runs the tests twice, which is interesting behavior.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

--test=root and --run-tests should be equivalent, are you testing this on develop? If you want to run both make check and your custom unit tests, your current approach is fine, or you can add make check to your custom function and override the default check.

yes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Make sure you're using --test=root and not --test-root

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It does not seem to be working that way for me. If I rename the method to check instead of check_install and use --test=root or --run-tests the custom check (with the decorates present) is not run.

Just merge 'AS IS.' If I can narrow down the problem with a simple reproducer, I will file a github issue.

@adamjstewart
Copy link
Copy Markdown
Member

I can merge this PR as is if you want, but if there's a bug in our --test=root implementation, you should file an issue with a simpler package to reproduce the bug so we can investigate.

@adamjstewart adamjstewart merged commit d7db42e into spack:develop Nov 27, 2019
@naromero77 naromero77 deleted the QMCPACKUpdateNov2019 branch November 27, 2019 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants