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.mach...@linaro.org>

        * Test.mk: Invoke sanity tests and functional tests with sudo.

Signed-off-by: Luis Machado <luis.mach...@linaro.org>
---
 Test.mk | 4 ++--
 1 file 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)
-- 
2.17.1

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to