summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2020-03-30 17:44:58 -0500
committerGitHub <noreply@github.com>2020-03-30 17:44:58 -0500
commit3c18d2a0e8564443b0bbd87e6f394ef821e69661 (patch)
tree1688b614206e2478dfed03f6c12c4b1f8af76e30
parent3f50b9e08dcd16c71946183376cf58414ea9b958 (diff)
downloadspack-3c18d2a0e8564443b0bbd87e6f394ef821e69661.tar.gz
spack-3c18d2a0e8564443b0bbd87e6f394ef821e69661.tar.bz2
spack-3c18d2a0e8564443b0bbd87e6f394ef821e69661.tar.xz
spack-3c18d2a0e8564443b0bbd87e6f394ef821e69661.zip
py-torch: make sure unit tests are registered (#15765)
-rw-r--r--var/spack/repos/builtin/packages/py-torch/package.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py
index c0be1176e4..e1dbdccb6d 100644
--- a/var/spack/repos/builtin/packages/py-torch/package.py
+++ b/var/spack/repos/builtin/packages/py-torch/package.py
@@ -287,9 +287,11 @@ class PyTorch(PythonPackage, CudaPackage):
enable_or_disable('zstd', newer=True)
enable_or_disable('tbb', newer=True)
- def test(self):
- pass
-
def install_test(self):
with working_dir('test'):
python('run_test.py')
+
+ # Tests need to be re-added since `phases` was overridden
+ run_after('install')(
+ PythonPackage._run_default_install_time_test_callbacks)
+ run_after('install')(PythonPackage.sanity_check_prefix)