upcxx: Add support for stand-alone post-install tests (#23714)

This uses the existing script which is always installed for this purpose in modern versions.
This commit is contained in:
Dan Bonachea 2021-05-18 20:40:51 -04:00 committed by GitHub
parent f0d5d992e6
commit ce7516f25f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,3 +175,15 @@ def test_install(self):
if 'cross=none' in self.spec:
make('run-tests', 'NETWORKS=smp') # runs tests for smp backend
make('tests-clean') # cleanup
def test(self):
if self.spec.version <= Version('2019.9.0'):
spack.main.send_warning_to_tty(
"post-install tests not supported in UPC++ version " +
self.spec.version.string + " -- SKIPPED")
else: # run post-install smoke test:
test_install = join_path(self.prefix.bin, 'test-upcxx-install.sh')
self.run_test(test_install, expected=['SUCCESS'], status=0,
installed=True,
purpose='Checking UPC++ compile+link ' +
'for all installed backends')