From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api 3/3] tests: conditionally skip integration tests
Date: Fri, 2 Jan 2026 21:32:01 +0100 [thread overview]
Message-ID: <20260102203253.28218-4-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20260102203253.28218-1-s.ivanov@proxmox.com>
By setting the SKIP_INTEGRATION_TESTS (environment or Makefile
variable) to a non-empty value the integration-tests are skipped.
To skip them in sbuild - check for the existance of /run/lock/sbuild
(inspired by pve-container's `src/test/Makefile`) with realpath[0],
which returns an empty string for a non-existing file.
tested by running `make sbuild`, `make deb` and
`SKIP_INTEGRATION_TESTS=y make deb`.
[0] https://www.gnu.org/software/make/manual/html_node/File-Name-Functions.html#index-realpath-1
Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
src/tests/Makefile | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/tests/Makefile b/src/tests/Makefile
index 3d5b0179..20833b4d 100644
--- a/src/tests/Makefile
+++ b/src/tests/Makefile
@@ -1,9 +1,16 @@
export PERLLIB = ..
+# realpath returns an empty string for non-existing files
+SKIP_INTEGRATION_TESTS ?= $(realpath /run/lock/sbuild)
+
all:
.PHONY: check
+ifeq ($(strip $(SKIP_INTEGRATION_TESTS)),)
check: test-utils test-sa-channel integration-tests
+else
+check: test-utils test-sa-channel
+endif
.PHONY: test-utils
test-utils:
--
2.47.3
_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
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 ` [pmg-devel] [PATCH pmg-api 2/3] tests: make test nature explicit Stoiko Ivanov
2026-01-02 20:32 ` Stoiko Ivanov [this message]
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-4-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.