From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api 0/3] enable building with sbuild, by refactoring tests
Date: Fri, 2 Jan 2026 21:31:58 +0100 [thread overview]
Message-ID: <20260102203253.28218-1-s.ivanov@proxmox.com> (raw)
Building pmg-api in sbuild is currently not possible, due to 2 issues:
* the format_date_header tests in test_util.pl implicitly assume a
CET/CEST timezone (patch 1/3)
* most other tests in pmg-api are integration-tests - they create postgres
databases, dump them, start services, and expect syslog to work.
this is changed by skipping the tests conditionally (with the condition
evaluating to true in an sbuild environment)
I considered reworking the tests on the database to output a stable text file
for comparison (the output of `pmgdb dump` would work), but the RuleDB
code is tightly coupled to writing to the database - changing that would
amount to a far larger refactoring of pmg-api. So instead leave the
default build calls most of us working with pmg-api as they are and skip
the tests in sbuild (or by setting an environment variable).
checking out autopkgtests for the other tests is probably a good idea -
but should not prevent us from having a working sbuild target for pmg-api.
Stoiko Ivanov (3):
tests: test_utils: do not rely on system timezone
tests: make test nature explicit
tests: conditionally skip integration tests
src/tests/Makefile | 32 +++++++++++++++++++-------------
src/tests/test_utils.pl | 5 ++++-
2 files changed, 23 insertions(+), 14 deletions(-)
--
2.47.3
_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
next 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 Stoiko Ivanov [this message]
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 ` [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-1-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