Blame SOURCES/test_as_installed.patch

d0c9a6
From 420ae1af11fad3151b5bfa676e7218168e4e6f3f Mon Sep 17 00:00:00 2001
d0c9a6
From: Chris Leech <cleech@redhat.com>
d0c9a6
Date: Wed, 26 May 2021 10:00:17 -0700
d0c9a6
Subject: [PATCH 1/1] run tests with binaries from arbitrary paths
d0c9a6
d0c9a6
---
d0c9a6
 tests/Makefile   | 4 ++++
d0c9a6
 tests/harness.py | 4 ++++
d0c9a6
 2 files changed, 8 insertions(+)
d0c9a6
d0c9a6
diff --git a/tests/Makefile b/tests/Makefile
d0c9a6
index 372572d..2c61183 100644
d0c9a6
--- a/tests/Makefile
d0c9a6
+++ b/tests/Makefile
d0c9a6
@@ -48,3 +48,7 @@ quick: tests-no-security
d0c9a6
 tests-no-security:
d0c9a6
 	@echo running tests without security -- takes about 2 minutes
d0c9a6
 	./test-isns.py
d0c9a6
+
d0c9a6
+tests-as-installed:
d0c9a6
+	@echo running tests from installed executables -- takes about 2 minutes
d0c9a6
+	./test-isns.py -s --path="/usr/sbin"
d0c9a6
diff --git a/tests/harness.py b/tests/harness.py
d0c9a6
index 39fc5e6..b710f5a 100644
d0c9a6
--- a/tests/harness.py
d0c9a6
+++ b/tests/harness.py
d0c9a6
@@ -137,6 +137,9 @@ def new_initArgParsers(self):
d0c9a6
     self._main_parser.add_argument('-d', '--debug', dest='debug',
d0c9a6
             action='store_true',
d0c9a6
             help='Enable developer debugging')
d0c9a6
+    self._main_parser.add_argument('--path', dest='path',
d0c9a6
+            action='store', default='..',
d0c9a6
+            help='Set isns bin path, to run from installed executables')
d0c9a6
 
d0c9a6
 def new_parseArgs(self, argv):
d0c9a6
     """
d0c9a6
@@ -148,6 +151,7 @@ def new_parseArgs(self, argv):
d0c9a6
     Global.verbosity = self.verbosity
d0c9a6
     Global.security = self.security
d0c9a6
     Global.debug = self.debug
d0c9a6
+    Global._isns_bin_dir = self.path
d0c9a6
     dprint("found: verbosity=%d, security=%s" % \
d0c9a6
            (Global.verbosity, Global.security))
d0c9a6
 
d0c9a6
-- 
d0c9a6
2.31.1
d0c9a6