diff options
author | Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> | 2023-05-11 05:39:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-11 14:39:09 +0200 |
commit | d8a72b68ddcc0fcd5861e0648d0412bba7828873 (patch) | |
tree | 7c7e9640965a3a7b08c7063c55d628d1e047f9e7 | |
parent | 040c6e486ee800df21eabaf20549f8cee5d92665 (diff) | |
download | spack-d8a72b68ddcc0fcd5861e0648d0412bba7828873.tar.gz spack-d8a72b68ddcc0fcd5861e0648d0412bba7828873.tar.bz2 spack-d8a72b68ddcc0fcd5861e0648d0412bba7828873.tar.xz spack-d8a72b68ddcc0fcd5861e0648d0412bba7828873.zip |
bricks: convert to new stand-alone test process (#35694)
-rw-r--r-- | var/spack/repos/builtin/packages/bricks/package.py | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/var/spack/repos/builtin/packages/bricks/package.py b/var/spack/repos/builtin/packages/bricks/package.py index d20d9f170f..be5023304e 100644 --- a/var/spack/repos/builtin/packages/bricks/package.py +++ b/var/spack/repos/builtin/packages/bricks/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os + from spack.package import * @@ -71,25 +73,17 @@ class Bricks(CMakePackage): ] self.cache_extra_test_sources(srcs) - def test(self): - """Test bricklib package""" - # Test prebuilt binary + def test_bricklib_example(self): + """build and run pre-built example""" source_dir = join_path(self.test_suite.current_test_cache_dir, "examples", "external") + if not os.path.exists(source_dir): + raise SkipTest("{0} is missing".format(source_dir)) + + with working_dir(source_dir): + cmake = which(self.spec["cmake"].prefix.bin.cmake) + cmake(".") + + cmake("--build", ".") - self.run_test( - exe="cmake", options=["."], purpose="Configure bricklib example", work_dir=source_dir - ) - - self.run_test( - exe="cmake", - options=["--build", "."], - purpose="Build bricklib example", - work_dir=source_dir, - ) - - self.run_test( - exe=join_path(source_dir, "example"), - options=[], - purpose="Execute bricklib example", - work_dir=source_dir, - ) + example = which("example") + example() |