public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer 5/6] buildsys: setup proper test environment for testsuite
Date: Wed,  6 Dec 2023 12:34:54 +0100	[thread overview]
Message-ID: <20231206113456.411898-6-c.heiss@proxmox.com> (raw)
In-Reply-To: <20231206113456.411898-1-c.heiss@proxmox.com>

Some test to come will need a proper environment.

`prepare-test-env` can also be generally useful while developing to
quickly set up a new test environment as needed.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
 Makefile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 6f64c4e..601c836 100644
--- a/Makefile
+++ b/Makefile
@@ -77,8 +77,15 @@ $(DSC): $(BUILDDIR)
 sbuild: $(DSC)
 	sbuild $(DSC)
 
+.PHONY: prepare-test-env
+prepare-test-env: cd-info.test country.dat test.img
+	rm -rf testdir
+	mkdir -p testdir/var/lib/proxmox-installer/
+	cp -v country.dat testdir/var/lib/proxmox-installer/
+	./proxmox-low-level-installer -t test.img dump-env
+
 .PHONY: test
-test:
+test: prepare-test-env
 	$(MAKE) -C test check
 	$(CARGO) test --workspace $(CARGO_BUILD_ARGS)
 
-- 
2.42.0





  parent reply	other threads:[~2023-12-06 11:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-06 11:34 [pve-devel] [PATCH installer 0/6] switch low-level installer protocol to json Christoph Heiss
2023-12-06 11:34 ` [pve-devel] [PATCH installer 1/6] low-level: align wording of finish message Christoph Heiss
2023-12-06 11:34 ` [pve-devel] [PATCH installer 2/6] ui: stdio: log error if display_html() is called on stdio backend Christoph Heiss
2023-12-06 11:34 ` [pve-devel] [PATCH installer 3/6] tui, ui: switch over to JSON-based protocol Christoph Heiss
2024-02-24 16:55   ` Thomas Lamprecht
2023-12-06 11:34 ` [pve-devel] [PATCH installer 4/6] test: add tests for UI^2 stdio protocol Christoph Heiss
2023-12-06 11:34 ` Christoph Heiss [this message]
2023-12-06 11:34 ` [pve-devel] [PATCH installer 6/6] tui: install progress: " Christoph Heiss
2024-01-24  9:54 ` [pve-devel] [PATCH installer 0/6] switch low-level installer protocol to json Christoph Heiss
2024-02-26 14:07 ` [pve-devel] applied-series: " Thomas Lamprecht

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=20231206113456.411898-6-c.heiss@proxmox.com \
    --to=c.heiss@proxmox.com \
    --cc=pve-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal