aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Machado <luis.machado@linaro.org>2019-01-11 15:52:51 -0200
committerLisa Nguyen <lisa.nguyen@linaro.org>2019-01-13 15:55:25 -0800
commitafefb46f752fda5fdd62b12144e320736a907e7b (patch)
treeebf3cbbaf654b30640428853c1179d22d5d23f22
parent0b06ec7950fbbbf5dc5e7ad25bec790c4596e98f (diff)
Invoke scripts with sudo
We were requiring the user to run the whole makefile as sudo. The following patch uses sudo to call the sanity check scripts and the functional tests only. 2019-01-11 Luis Machado <luis.machado@linaro.org> * Test.mk: Invoke sanity tests and functional tests with sudo. Signed-off-by: Luis Machado <luis.machado@linaro.org>
-rw-r--r--Test.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/Test.mk b/Test.mk
index 455dc3a..3c12a9e 100644
--- a/Test.mk
+++ b/Test.mk
@@ -37,7 +37,7 @@ EXEC=$(SRC:%.c=%)
build_utils: $(EXEC)
SANITY_STATUS:= $(shell if test $(SNT) && test -f $(SNT); then \
- ./$(SNT); if test "$$?" -eq 0; then echo 0; else \
+ sudo ./$(SNT); if test "$$?" -eq 0; then echo 0; else \
echo 1; fi; else echo 1; fi)
ifeq "$(SANITY_STATUS)" "1"
@@ -49,7 +49,7 @@ run_tests: uncheck $(EXEC) $(LOG)
@echo -n "### "; cat $(<:.sh=.txt);
@echo -n "### "; grep "URL :" ./$< | awk '/http/{print $$NF}'
@echo "###"
- -@./$< 2> $@
+ -@sudo ./$< 2> $@
else
run_tests:
./$(SNT)