mirror of
https://github.com/containers/podman.git
synced 2025-05-17 23:26:08 +08:00
unit tests: root check
The unit tests currently require running as root. This has caused some confusion that justifies adding a root check to `make localunit` and error out for non-root users instead of starting the tests deemed to fail. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
5
hack/check_root.sh
Executable file
5
hack/check_root.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
if ! [ $(id -u) = 0 ]; then
|
||||
echo "Please run as root! '$@' requires root privileges."
|
||||
exit 1
|
||||
fi
|
Reference in New Issue
Block a user