From 1fe96cfb71baa915d02d7734739bed7ecc9d79cd Mon Sep 17 00:00:00 2001 From: "Pablo M. Bermudo Garay" Date: Wed, 19 Apr 2017 01:19:09 +0200 Subject: tests: xlate: check if it is being run as root Signed-off-by: Pablo M. Bermudo Garay Signed-off-by: Pablo Neira Ayuso --- xlate-test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlate-test.py') diff --git a/xlate-test.py b/xlate-test.py index 37760e96..43c4be19 100755 --- a/xlate-test.py +++ b/xlate-test.py @@ -72,7 +72,9 @@ def load_test_files(): def main(): - if args.test: + if os.getuid() != 0: + print(red("Error: ") + "You need to be root to run this, sorry") + elif args.test: if not args.test.endswith(".txlate"): args.test += ".txlate" try: -- cgit v1.2.3