From 38159dfc14f816516e462794fd8d37bce7581414 Mon Sep 17 00:00:00 2001
From: Florian Kaltenberger <florian.kaltenberger@eurecom.fr>
Date: Fri, 19 Feb 2016 17:15:31 +0100
Subject: [PATCH] improving sudo usage in build script

---
 cmake_targets/autotests/run_exec_autotests.bash | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmake_targets/autotests/run_exec_autotests.bash b/cmake_targets/autotests/run_exec_autotests.bash
index a622b07efb..4608c58e9b 100755
--- a/cmake_targets/autotests/run_exec_autotests.bash
+++ b/cmake_targets/autotests/run_exec_autotests.bash
@@ -12,7 +12,7 @@ trap handle_ctrl_c INT
 source $OPENAIR_DIR/cmake_targets/tools/test_helper
 
 
-#SUDO="sudo -E "
+SUDO="sudo -E -S"
 tdir=$OPENAIR_DIR/cmake_targets/autotests
 rm -fr $tdir/bin 
 mkdir -p $tdir/bin
@@ -509,7 +509,7 @@ for search_expr in "${test_case_array[@]}"
     if [ "$class" == "compilation" ]; then
         test_compile "$name" "$compile_prog" "$compile_prog_args" "$pre_exec" "$pre_exec_args" "$main_exec" "$main_exec_args" "search_array_true[@]" "$search_expr_false" "$nruns" "$pre_compile_prog" "$class" "$compile_prog_out" "$tags"
     elif  [ "$class" == "execution" ]; then
-        $SUDO killall -q oaisim_nos1
+        echo \'passwd\' | $SUDO killall -q oaisim_nos1
         test_compile_and_run "$name" "$compile_prog" "$compile_prog_args" "$pre_exec" "$pre_exec_args" "$main_exec" "$main_exec_args" "search_array_true[@]" "$search_expr_false" "$nruns" "$pre_compile_prog" "$class" "$compile_prog_out" "$tags" "$mypassword" "$test_config_file"
     else
         echo "Unexpected class of test case...Skipping the test case $name ...."
-- 
GitLab