summaryrefslogtreecommitdiffstats
path: root/test/units/TEST-74-AUX-UTILS.detect-virt.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtest/units/TEST-74-AUX-UTILS.detect-virt.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/units/TEST-74-AUX-UTILS.detect-virt.sh b/test/units/TEST-74-AUX-UTILS.detect-virt.sh
new file mode 100755
index 0000000..fe1db4d
--- /dev/null
+++ b/test/units/TEST-74-AUX-UTILS.detect-virt.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+# SPDX-License-Identifier: LGPL-2.1-or-later
+set -eux
+set -o pipefail
+
+SYSTEMD_IN_CHROOT=1 systemd-detect-virt --chroot
+(! SYSTEMD_IN_CHROOT=0 systemd-detect-virt --chroot)