memkind/0002-Execute-tests-from-package-installation-directory.patch
Rafael Aquini 521f6dc363 Update upstream fixes for memkind-0.3.0
- Switch old init.d scripts for systemd unit service
- Fix fc24 build error

Signed-off-by: Rafael Aquini <aquini@linux.com>
2016-02-06 13:48:14 -05:00

71 lines
2.7 KiB
Diff

From ee2f8088586b0e26f2f837a5126b93039255b6e4 Mon Sep 17 00:00:00 2001
Message-Id: <ee2f8088586b0e26f2f837a5126b93039255b6e4.1454769807.git.aquini@redhat.com>
In-Reply-To: <6aacbbcbb67cbc45eee780eb9765bd066e299f19.1454769807.git.aquini@redhat.com>
References: <6aacbbcbb67cbc45eee780eb9765bd066e299f19.1454769807.git.aquini@redhat.com>
From: Grzegorz Ozanski <grzegorz.ozanski@intel.com>
Date: Fri, 25 Sep 2015 09:50:10 -0400
Subject: [PATCH 2/3] Execute tests from package installation directory
---
test/memkind_ft.py | 23 +++++++----------------
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/test/memkind_ft.py b/test/memkind_ft.py
index d75e270..94ac695 100644
--- a/test/memkind_ft.py
+++ b/test/memkind_ft.py
@@ -52,13 +52,13 @@ import xml.dom.minidom
if os.name == 'posix':
Linux = True
- HOST = "/usr/share/mpss/test/memkind-dt/"
+ tests_home = "/usr/share/mpss/test/memkind-dt/"
slash = "/"
else:
import _winreg
Linux = False
mpss_home = os.environ.get("INTEL_MPSS_HOME")
- HOST = mpss_home + "test\\windows-memkind-dt\\"
+ tests_home = mpss_home + "test\\windows-memkind-dt\\"
slash = "\\"
def setup_logging(name):
@@ -203,19 +203,10 @@ if __name__ == "__main__":
(opts, args) = parser.parse_args()
- if Linux:
- cmd = './' + sys.argv[1]
- else:
- cmd = sys.argv[1]
+ cmd = tests_home + sys.argv[1]
- if Linux:
- if opts.list:
- shutil.copy(HOST+sys.argv[1], source)
- cmd = cmd + " --gtest_list_tests"
- else:
- if opts.list:
- shutil.copy(HOST+sys.argv[1]+'.exe', source)
- cmd = cmd + " --gtest_list_tests"
+ if opts.list:
+ cmd = cmd + " --gtest_list_tests"
if opts.time:
sys.exit()
@@ -239,9 +230,9 @@ if __name__ == "__main__":
test_main = test
else: #Run test command
if "SchedGeTest" in test_main:
- test_cmd = "LD_PRELOAD="+HOST+"libsched.so ./schedcpu_test" + " --gtest_output=xml:" + xmlt
+ test_cmd = "LD_PRELOAD=" + tests_home + "libsched.so " + tests_home + "schedcpu_test" + " --gtest_output=xml:" + xmlt
elif "TiedDistTest" in test_main:
- test_cmd = "LD_PRELOAD="+HOST+"libnumadist.so ./tieddisterr_test" + " --gtest_output=xml:" + xmlt
+ test_cmd = "LD_PRELOAD=" + tests_home + "libnumadist.so " + tests_home + "tieddisterr_test" + " --gtest_output=xml:" + xmlt
else:
test_cmd = cmd + " --gtest_filter=" +test_main+test + " --gtest_output=xml:" + xmlt
print test_cmd
--
2.5.0