]> git.proxmox.com Git - pve-installer.git/blobdiff - Makefile
gui: use basic grid in country/timezone panel
[pve-installer.git] / Makefile
index 73a4e7081f0f01c107cd16e29e756d3869d6215a..fea09c55c8bd69e957160ec9e73c15313a24eea6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,7 @@ all:
 $(BUILDDIR):
        rm -rf $@ $@.tmp; mkdir $@.tmp
        cp -a \
+         .cargo \
          Cargo.toml \
          Makefile \
          Proxmox/ \
@@ -42,7 +43,9 @@ $(BUILDDIR):
          proxinstall \
          proxmox-low-level-installer \
          proxmox-tui-installer/ \
+         proxmox-installer-common/ \
          spice-vdagent.sh \
+         test/ \
          unconfigured.sh \
          xinitrc \
          $@.tmp
@@ -74,6 +77,11 @@ $(DSC): $(BUILDDIR)
 sbuild: $(DSC)
        sbuild $(DSC)
 
+.PHONY: test
+test:
+       $(MAKE) -C test check
+       $(CARGO) test --workspace $(CARGO_BUILD_ARGS)
+
 DESTDIR=
 VARLIBDIR=$(DESTDIR)/var/lib/proxmox-installer
 HTMLDIR=$(VARLIBDIR)/html/common
@@ -89,7 +97,7 @@ install: $(INSTALLER_SOURCES) $(CARGO_COMPILEDIR)/proxmox-tui-installer
        install -D -m 755 unconfigured.sh $(DESTDIR)/sbin/unconfigured.sh
        install -D -m 755 proxinstall $(DESTDIR)/usr/bin/proxinstall
        install -D -m 755 proxmox-low-level-installer $(DESTDIR)/$(BINDIR)/proxmox-low-level-installer
-       $(foreach i,$(USR_BIN), install -m755 $(CARGO_COMPILEDIR)/$(i) $(DESTDIR)$(BINDIR)/)
+       $(foreach i,$(USR_BIN), install -m755 $(CARGO_COMPILEDIR)/$(i) $(DESTDIR)$(BINDIR)/ ;)
        install -D -m 755 checktime $(DESTDIR)/usr/bin/checktime
        install -D -m 644 xinitrc $(DESTDIR)/.xinitrc
        install -D -m 755 spice-vdagent.sh $(DESTDIR)/.spice-vdagent.sh
@@ -131,18 +139,23 @@ cd-info.test:
 
 check-pve: prepare-check-env test.img
        rm -f cd-info.test; $(MAKE) cd-info.test
-       ./proxmox-low-level-installer dump-env -t
+       ./proxmox-low-level-installer dump-env -t test.img
        G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img
 
 check-pve-multidisks: prepare-check-env test.img test2.img test3.img test4.img test5.big.img
        rm -f cd-info.test; $(MAKE) cd-info.test
-       ./proxmox-low-level-installer dump-env -t
+       ./proxmox-low-level-installer dump-env -t test.img,test2.img,test3.img,test4.img,test5.big.img
        G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img,test2.img,test3.img,test4.img,test5.big.img
 
 check-pve-tui: prepare-check-env test.img
        rm -f cd-info.test; $(MAKE) cd-info.test
-       ./proxmox-low-level-installer dump-env -t
-       testdir/usr/bin/proxmox-tui-installer -t test.img
+       ./proxmox-low-level-installer dump-env -t test.img
+       testdir/usr/bin/proxmox-tui-installer -t test.img 2>testdir/run/stderr
+
+check-pve-tui-multidisks: prepare-check-env test.img test2.img test3.img test4.img test5.big.img
+       rm -f cd-info.test; $(MAKE) cd-info.test
+       ./proxmox-low-level-installer dump-env -t test.img,test2.img,test3.img,test4.img,test5.big.img
+       testdir/usr/bin/proxmox-tui-installer -t test.img,test2.img,test3.img,test4.img,test5.big.img
 
 prepare-check-pmg: prepare-check-env test.img
        rm -f cd-info.test; $(MAKE) \
@@ -150,13 +163,13 @@ prepare-check-pmg: prepare-check-env test.img
            PRODUCTLONG="Proxmox Mail Gateway" \
            ISONAME='proxmox-mail-gateway' \
            cd-info.test
-       ./proxmox-low-level-installer dump-env -t
+       ./proxmox-low-level-installer dump-env -t test.img
 
 check-pmg: prepare-check-pmg
        G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img
 
 check-pmg-tui: prepare-check-pmg
-       testdir/usr/bin/proxmox-tui-installer -t test.img
+       testdir/usr/bin/proxmox-tui-installer -t test.img 2>testdir/run/stderr
 
 prepare-check-pbs: prepare-check-env test.img
        rm -f cd-info.test; $(MAKE) \
@@ -164,13 +177,13 @@ prepare-check-pbs: prepare-check-env test.img
            PRODUCTLONG='Proxmox Backup Server' \
            ISONAME='proxmox-backup-server' \
            cd-info.test
-       ./proxmox-low-level-installer dump-env -t
+       ./proxmox-low-level-installer dump-env -t test.img
 
 check-pbs: prepare-check-pbs
        G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img
 
 check-pbs-tui: prepare-check-pbs
-       testdir/usr/bin/proxmox-tui-installer -t test.img
+       testdir/usr/bin/proxmox-tui-installer -t test.img 2>testdir/run/stderr
 
 .phony: clean
 clean: