Fix service test to delete Carriage Return. 24/175124/1 accepted/tizen/4.0/unified/20180411.153057 submit/tizen_4.0/20180409.051346 submit/tizen_4.0/20180410.013216
authorjin-gyu.kim <jin-gyu.kim@samsung.com>
Mon, 9 Apr 2018 04:53:10 +0000 (13:53 +0900)
committerjin-gyu.kim <jin-gyu.kim@samsung.com>
Mon, 9 Apr 2018 04:53:15 +0000 (13:53 +0900)
- If service file is written in window, the unexpected result is
comming due to Carriage Return.

Change-Id: I68638dc44007f2297eab368b15e7af593cd46491

test/new_service_test/check_new_service.sh

index ae6620520b97c597a6d2aaf2d881b42b0fdd5286..bec5b6f63fd8a10dfdc33274b9f6de546a0ef39e 100644 (file)
@@ -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