From: jin-gyu.kim Date: Mon, 9 Apr 2018 04:53:10 +0000 (+0900) Subject: Fix service test to delete Carriage Return. X-Git-Tag: submit/tizen/20180410.013232^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61f86c3f665b0cd052d64da499eba647a31fb92b;p=platform%2Fcore%2Fsecurity%2Fsecurity-config.git Fix service test to delete Carriage Return. - If service file is written in window, the unexpected result is comming due to Carriage Return. Change-Id: I68638dc44007f2297eab368b15e7af593cd46491 --- diff --git a/test/new_service_test/check_new_service.sh b/test/new_service_test/check_new_service.sh index 12c5559..999a580 100644 --- a/test/new_service_test/check_new_service.sh +++ b/test/new_service_test/check_new_service.sh @@ -49,9 +49,9 @@ function find_service { for line in `find "$1" -type f -name "*service" 2> /dev/null` do - uid=";$(cat $line | grep "User=" | grep -v "#" | cut -d "=" -f2)" - gid=";$(cat $line | grep "Group=" | grep -v "#" | cut -d "=" -f2)" - smacklabel=";$(cat $line | grep "SmackProcessLabel=" | grep -v "#" | cut -d "=" -f2);" + uid=";$(cat $line | grep "User=" | grep -v "#" | cut -d "=" -f2 | tr -d '\015')" + gid=";$(cat $line | grep "Group=" | grep -v "#" | cut -d "=" -f2 | tr -d '\015')" + smacklabel=";$(cat $line | grep "SmackProcessLabel=" | grep -v "#" | cut -d "=" -f2 | tr -d '\015');" check_service $line $uid $gid $smacklabel $2 done