povray: new test API (#45174)
* povray: new test API * capture output and test name change * povray: add v3.7.0.10, deprecate 3.7.0.8 --------- Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
This commit is contained in:
parent
f371b6f06c
commit
564155fd1a
@ -23,16 +23,19 @@ class Povray(AutotoolsPackage):
|
|||||||
realistic reflections, shading, perspective and other effects.
|
realistic reflections, shading, perspective and other effects.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Add a proper url for your package's homepage here.
|
|
||||||
homepage = "http://povray.org/download/"
|
homepage = "http://povray.org/download/"
|
||||||
url = "https://github.com/POV-Ray/povray/archive/v3.7.0.8.tar.gz"
|
url = "https://github.com/POV-Ray/povray/archive/v3.7.0.8.tar.gz"
|
||||||
git = "https://github.com/POV-Ray/povray.git"
|
git = "https://github.com/POV-Ray/povray.git"
|
||||||
|
|
||||||
# maintainers('payerle' )
|
|
||||||
|
|
||||||
license("AGPL-3.0-or-later")
|
license("AGPL-3.0-or-later")
|
||||||
|
|
||||||
version("3.7.0.8", sha256="53d11ebd2972fc452af168a00eb83aefb61387662c10784e81b63e44aa575de4")
|
version("3.7.0.10", sha256="7bee83d9296b98b7956eb94210cf30aa5c1bbeada8ef6b93bb52228bbc83abff")
|
||||||
|
# The following version no longer builds
|
||||||
|
version(
|
||||||
|
"3.7.0.8",
|
||||||
|
sha256="53d11ebd2972fc452af168a00eb83aefb61387662c10784e81b63e44aa575de4",
|
||||||
|
deprecated=True,
|
||||||
|
)
|
||||||
|
|
||||||
depends_on("c", type="build") # generated
|
depends_on("c", type="build") # generated
|
||||||
depends_on("cxx", type="build") # generated
|
depends_on("cxx", type="build") # generated
|
||||||
@ -105,8 +108,8 @@ def configure_args(self):
|
|||||||
# We generate a generic using process owner and fqdn of build host.
|
# We generate a generic using process owner and fqdn of build host.
|
||||||
fqdn = socket.getfqdn()
|
fqdn = socket.getfqdn()
|
||||||
uname = getpass.getuser()
|
uname = getpass.getuser()
|
||||||
compiled_by = "Installed by spack <{0}@{1}>".format(uname, fqdn)
|
compiled_by = f"Installed by spack <{uname}@{fqdn}>"
|
||||||
extra_args.append("COMPILED_BY={0}".format(compiled_by))
|
extra_args.append(f"COMPILED_BY={compiled_by}")
|
||||||
|
|
||||||
extra_args.append("--disable-silent-rules") # Verbose make output
|
extra_args.append("--disable-silent-rules") # Verbose make output
|
||||||
extra_args += self.enable_or_disable("debug")
|
extra_args += self.enable_or_disable("debug")
|
||||||
@ -115,32 +118,32 @@ def configure_args(self):
|
|||||||
extra_args += self.enable_or_disable("static")
|
extra_args += self.enable_or_disable("static")
|
||||||
|
|
||||||
if "+boost" in self.spec:
|
if "+boost" in self.spec:
|
||||||
extra_args.append("--with-boost={0}".format(self.spec["boost"].prefix))
|
extra_args.append(f"--with-boost={self.spec['boost'].prefix}")
|
||||||
else:
|
else:
|
||||||
extra_args.append("--without-boost")
|
extra_args.append("--without-boost")
|
||||||
|
|
||||||
if "+jpeg" in self.spec:
|
if "+jpeg" in self.spec:
|
||||||
extra_args.append("--with-libjpeg={0}".format(self.spec["jpeg"].prefix))
|
extra_args.append(f"--with-libjpeg={self.spec['jpeg'].prefix}")
|
||||||
else:
|
else:
|
||||||
extra_args.append("--without-libjpeg")
|
extra_args.append("--without-libjpeg")
|
||||||
|
|
||||||
if "+libpng" in self.spec:
|
if "+libpng" in self.spec:
|
||||||
extra_args.append("--with-libpng={0}".format(self.spec["libpng"].prefix))
|
extra_args.append(f"--with-libpng={self.spec['libpng'].prefix}")
|
||||||
else:
|
else:
|
||||||
extra_args.append("--without-libpng")
|
extra_args.append("--without-libpng")
|
||||||
|
|
||||||
if "+libtiff" in self.spec:
|
if "+libtiff" in self.spec:
|
||||||
extra_args.append("--with-libtiff={0}".format(self.spec["libtiff"].prefix))
|
extra_args.append(f"--with-libtiff={self.spec['libtiff'].prefix}")
|
||||||
else:
|
else:
|
||||||
extra_args.append("--without-libtiff")
|
extra_args.append("--without-libtiff")
|
||||||
|
|
||||||
if "+mkl" in self.spec:
|
if "+mkl" in self.spec:
|
||||||
extra_args.append("--with-libmkl={0}".format(self.spec["mkl"].prefix))
|
extra_args.append(f"--with-libmkl={self.spec['mkl'].prefix}")
|
||||||
else:
|
else:
|
||||||
extra_args.append("--without-libmkl")
|
extra_args.append("--without-libmkl")
|
||||||
|
|
||||||
if "+openexr" in self.spec:
|
if "+openexr" in self.spec:
|
||||||
extra_args.append("--with-openexr={0}".format(self.spec["openexr"].prefix))
|
extra_args.append(f"--with-openexr={self.spec['openexr'].prefix}")
|
||||||
else:
|
else:
|
||||||
extra_args.append("--without-openexr")
|
extra_args.append("--without-openexr")
|
||||||
|
|
||||||
@ -151,12 +154,11 @@ def configure_args(self):
|
|||||||
|
|
||||||
return extra_args
|
return extra_args
|
||||||
|
|
||||||
def test(self):
|
def test_render_sample(self):
|
||||||
|
"""Render sample file"""
|
||||||
povs = find(self.prefix.share, "biscuit.pov")[0]
|
povs = find(self.prefix.share, "biscuit.pov")[0]
|
||||||
copy(povs, ".")
|
copy(povs, ".")
|
||||||
self.run_test(
|
exe = which("povray")
|
||||||
"povray",
|
out = exe("biscuit.pov", output=str.split, error=str.split)
|
||||||
options=["biscuit.pov"],
|
expected = "POV-Ray finished"
|
||||||
purpose="test: render sample file",
|
assert expected in out
|
||||||
expected=["POV-Ray finished"],
|
|
||||||
)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user