]> git.proxmox.com Git - pve-container.git/blobdiff - src/test/Makefile
skip userns tests in sbuild environment
[pve-container.git] / src / test / Makefile
index 8734879647844609b33356650a6351e4ba045acc..91ae6ff4d4e5a3803360bef4271bad0b40848a91 100644 (file)
@@ -2,16 +2,27 @@ RUN_USERNS := lxc-usernsexec -m "u:0:`id -u`:1" -m "g:0:`id -g`:1" --
 
 all: test
 
-test: test_setup test_snapshot test_bindmount
+test: test_setup test_snapshot test_bindmount test_idmap
 
 test_setup: run_setup_tests.pl
-       $(RUN_USERNS) ./run_setup_tests.pl
+       if test -e /run/lock/sbuild; then \
+               echo skipping userns tests in sbuild environment ; \
+       else \
+               $(RUN_USERNS) ./run_setup_tests.pl ; \
+       fi
 
 test_snapshot: run_snapshot_tests.pl
        ./run_snapshot_tests.pl
 
 test_bindmount: bindmount_test.pl
-       $(RUN_USERNS) ./bindmount_test.pl
+       if test -e /run/lock/sbuild; then \
+               echo skipping userns tests in sbuild environment ; \
+       else \
+               $(RUN_USERNS) ./bindmount_test.pl ; \
+       fi
+
+test_idmap: run_idmap_tests.pl
+       ./run_idmap_tests.pl
 
 clean:
        rm -rf tmprootfs