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:05:14 -0800
commit52f67262f603a935d063d4c8f6aa35a6e8836d5a (patch)
tree35bbcc3fbccb6f35fff0ebf27a1d355f0cbe8ac8
parent87dce0820d84737101949c7d6a765e147319bbbc (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)