diff options
author | Luis Machado <luis.machado@linaro.org> | 2019-01-11 15:52:51 -0200 |
---|---|---|
committer | Lisa Nguyen <lisa.nguyen@linaro.org> | 2019-01-13 15:05:14 -0800 |
commit | 52f67262f603a935d063d4c8f6aa35a6e8836d5a (patch) | |
tree | 35bbcc3fbccb6f35fff0ebf27a1d355f0cbe8ac8 | |
parent | 87dce0820d84737101949c7d6a765e147319bbbc (diff) | |
download | pm-qa-52f67262f603a935d063d4c8f6aa35a6e8836d5a.tar.gz |
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.mk | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |