From 9a99c94b754daf078e7566b39ccc0362eb8ebd5d Mon Sep 17 00:00:00 2001 From: Tim Haines Date: Thu, 25 May 2023 17:48:52 -0500 Subject: [PATCH] Dyninst: add standalone test (#37876) * Dyninst: add standalone test * Add docstring with description * Don't use join_path for builtin path objects * Whitespace * Update format of docstring --- var/spack/repos/builtin/packages/dyninst/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py index 4079212ecf2..4bf1c354009 100644 --- a/var/spack/repos/builtin/packages/dyninst/package.py +++ b/var/spack/repos/builtin/packages/dyninst/package.py @@ -183,3 +183,12 @@ def cmake_args(self): args.append("-DENABLE_STATIC_LIBS=NO") return args + + def test_ptls(self): + """Run parseThat on /bin/ls to rewrite with basic instrumentation""" + parseThat = which(self.prefix.bin.parseThat) + os.environ["DYNINSTAPI_RT_LIB"] = join_path(self.prefix.lib, "libdyninstAPI_RT.so") + parseThat( + "--binary-edit={0:s}".format(join_path(self.test_suite.stage, "ls.rewritten")), + "/bin/ls", + )