diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml deleted file mode 100644 index 4ca9235..0000000 --- a/gating.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- !Policy -product_versions: - - rhel-10 -decision_context: osci_compose_gate -rules: - - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/plans/smoke.fmf b/plans/smoke.fmf new file mode 100644 index 0000000..08500e3 --- /dev/null +++ b/plans/smoke.fmf @@ -0,0 +1,6 @@ +discover: + how: fmf + dist-git-source: true + dist-git-install-builddeps: true +execute: + how: tmt diff --git a/test_as_installed.patch b/test_as_installed.patch index 372a4e2..768df9a 100644 --- a/test_as_installed.patch +++ b/test_as_installed.patch @@ -1,4 +1,4 @@ -From f04f3c56ac1598a787cee58489e3de5589d7f879 Mon Sep 17 00:00:00 2001 +From 041cf864d4c776b13fb04be5b7fa4958123d496e Mon Sep 17 00:00:00 2001 From: Chris Leech Date: Fri, 13 Dec 2024 20:48:21 -0800 Subject: [PATCH 1/1] Test from installed for CI @@ -6,13 +6,13 @@ Subject: [PATCH 1/1] Test from installed for CI Signed-off-by: Chris Leech --- tests/Makefile | 5 +++++ - tests/harness.py | 6 ++++++ - 2 files changed, 11 insertions(+) + tests/harness.py | 9 ++++++++- + 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 tests/Makefile diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 -index 0000000..cd856c2 +index 0000000..fdd79ac --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,5 @@ @@ -20,12 +20,20 @@ index 0000000..cd856c2 +# Excludes tests that use external test binaries (8-11) +tests-as-installed: + @echo running tests from installed executables -+ ./test-isns.py --bin-dir=/usr/sbin Test0{1..7} ++ ./test-isns.py --bin-dir=/usr/sbin diff --git a/tests/harness.py b/tests/harness.py -index f232132..d5a03b1 100644 +index f232132..6f3759a 100644 --- a/tests/harness.py +++ b/tests/harness.py -@@ -60,6 +60,8 @@ def get_bindir(): +@@ -8,6 +8,7 @@ import sys + import unittest + import re + import time ++from pathlib import Path + + # + # globals +@@ -60,6 +61,8 @@ def get_bindir(): """ return the directory where binaries live """ @@ -34,7 +42,7 @@ index f232132..d5a03b1 100644 return '%s/%s' % (Global.test_dir, Global.isns_bin_dir) def isns_stage(name, msg): -@@ -148,6 +150,9 @@ def new_initArgParsers(self): +@@ -148,6 +151,9 @@ def new_initArgParsers(self): self._main_parser.add_argument('-D', '--test-dir', dest='test_dir', default='.', help='Sets the test dir (default ".")') @@ -44,7 +52,7 @@ index f232132..d5a03b1 100644 def new_parseArgs(self, argv): """ -@@ -160,6 +165,7 @@ def new_parseArgs(self, argv): +@@ -160,6 +166,7 @@ def new_parseArgs(self, argv): Global.security = self.security Global.debug = self.debug Global.test_dir = self.test_dir @@ -52,6 +60,15 @@ index f232132..d5a03b1 100644 dprint("found: debug=%s, verbosity=%d, security=%s, list=%s, test_dir='%s'" % \ (Global.debug, Global.verbosity, Global.security, self.list, self.test_dir)) +@@ -432,7 +439,7 @@ def isns_external_test(client_config, args): + """ + logfile = get_logfile_from_config(client_config.path) + +- cmd = ['%s/%s' % (get_bindir(), args[0]), ++ cmd = ['%s/%s/%s' % (Path(__file__).resolve().parent.parent, "builddir", args[0]), + '-c', client_config.path] + args[1:] + exit_val = run_cmd(cmd, logfile) + return (logfile, exit_val) -- -2.47.0 +2.55.0 diff --git a/tests/smoke.fmf b/tests/smoke.fmf new file mode 100644 index 0000000..a5952c2 --- /dev/null +++ b/tests/smoke.fmf @@ -0,0 +1,12 @@ +summary: Run upstream tests +component: [isns-utils] +require: [make, python3] +test: > + rpmbuild -bc + --define "_sourcedir $TMT_SOURCE_DIR" + --define "_builddir $TMT_SOURCE_DIR/BUILD" + --define "_vpath_builddir builddir" + $TMT_SOURCE_DIR/*.spec && + cd $TMT_SOURCE_DIR/BUILD/open-isns-*/tests && + make tests-as-installed + diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 8ca7ed2..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- hosts: localhost - roles: - - role: standard-test-source - tags: - - always - - - role: standard-test-basic - tags: - - classic - required_packages: - - make - - python3 - - isns-utils - - openssl - tests: - - smoke: - dir: ./source/tests/ - run: make tests-as-installed -