From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api 2/3] tests: make test nature explicit
Date: Fri, 2 Jan 2026 21:32:00 +0100 [thread overview]
Message-ID: <20260102203253.28218-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20260102203253.28218-1-s.ivanov@proxmox.com>
Most of the tests in PMG's test-suite are integration tests in nature
- they create a database, set the default ruleset and compare it, or
run tests against a running pmgpolicy daemon.
The two test-suites that are closer to unit-tests are test_utils.pl
and ./test_sa_channel_parser.pl.
This patch refactors the Makefile (and drops a few commented out
lines) to make this distinction explicit, in preparation for only
running unit-tests in restricted build-environments (e.g. sbuild).
No functional change intended.
Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
src/tests/Makefile | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/src/tests/Makefile b/src/tests/Makefile
index 68f77e4d..3d5b0179 100644
--- a/src/tests/Makefile
+++ b/src/tests/Makefile
@@ -1,26 +1,25 @@
-#export TESTDB = "Proxmox_testdb"
-
export PERLLIB = ..
all:
.PHONY: check
-check: test-utils
+check: test-utils test-sa-channel integration-tests
+
+.PHONY: test-utils
+test-utils:
+ ./test_utils.pl
+
+.PHONY: test-sa-channel
+test-sa-channel:
+ ./test_sa_channel_parser.pl
+
+.PHONY: integration-tests
+integration-tests:
./create_testdb.pl
./init_testdb.pl
./print_testdb.pl > testdb.txt.new
diff -u testdb.txt testdb.txt.new
./test_greylist.pl
- ./test_sa_channel_parser.pl
-
-# test_config.pl \
-# test_mimetype.pl \
-# test_proxy.pl \
-# test_unpack.pl
-
-.PHONY: test-utils
-test-utils:
- ./test_utils.pl
clean:
rm -rf *~ proxytest_report.out test.cfg testdb.txt.new
--
2.47.3
_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
next prev parent reply other threads:[~2026-01-02 20:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-02 20:31 [pmg-devel] [PATCH pmg-api 0/3] enable building with sbuild, by refactoring tests Stoiko Ivanov
2026-01-02 20:31 ` [pmg-devel] [PATCH pmg-api 1/3] tests: test_utils: do not rely on system timezone Stoiko Ivanov
2026-01-02 20:32 ` Stoiko Ivanov [this message]
2026-01-02 20:32 ` [pmg-devel] [PATCH pmg-api 3/3] tests: conditionally skip integration tests Stoiko Ivanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260102203253.28218-3-s.ivanov@proxmox.com \
--to=s.ivanov@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox