diff options
author | ManikandanC <Manikandan.Chockalingam@in.bosch.com> | 2016-10-18 15:43:44 +0530 |
---|---|---|
committer | Christoph Lipka <clipka@users.noreply.github.com> | 2018-12-21 10:16:46 +0100 |
commit | e3c2501313d98ff9f4519116e6d2f36314e0240e (patch) | |
tree | d1472ee7047b598b4b25bb7c06748eaa6f9f61cf /tests/gtest_dlt_daemon_logstorage.sh | |
parent | 2262f8b3406ac903a37f96a63c6250de215d1866 (diff) | |
download | DLT-daemon-e3c2501313d98ff9f4519116e6d2f36314e0240e.tar.gz |
UnitTest: Updates
Gateway
Logstorage
Event Handler
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
Signed-off-by: Aditya Paluri <venkataaditya.paluri@in.bosch.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Diffstat (limited to 'tests/gtest_dlt_daemon_logstorage.sh')
-rwxr-xr-x | tests/gtest_dlt_daemon_logstorage.sh | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/gtest_dlt_daemon_logstorage.sh b/tests/gtest_dlt_daemon_logstorage.sh new file mode 100755 index 0000000..704feb7 --- /dev/null +++ b/tests/gtest_dlt_daemon_logstorage.sh @@ -0,0 +1,57 @@ +#!/bin/sh +######################################################################################## +#file : g_test_dlt_daemon_logstorage.sh +# +#Description : logstorage unit test preparation +# +#Author Name : Onkar Palkar +#Email Id : onkar.palkar@wipro.com +# +#History : Last modified date : 02/09/2016 +######################################################################################## +# +# Function: -cleanup() +# +# Description -Delete dlt_logstorage.conf file from tmp folder if present +# +# Return -Zero on success +# -Non zero on failure +# + +cleanup() +{ + tmpPath=/tmp + cd $tmpPath + rm -rf $tmpPath/dlt_logstorage.conf + return 0 +} + +# +# Function: -setupTest() +# +# Description -create logstorage.conf file +# +# Return -Zero on success +# -Non zero on failure +# +setupTest() +{ + touch $tmpPath/dlt_logstorage.conf + if [ $? -eq '1' ] + then + echo "Error in creating dlt_logstorage.conf file" + return 1 + fi + echo "[FILTER1]" >>$tmpPath/dlt_logstorage.conf + echo "LogAppName=DLST" >>$tmpPath/dlt_logstorage.conf + echo "ContextName=.*" >>$tmpPath/dlt_logstorage.conf + echo "LogLevel=DLT_LOG_ERROR" >>$tmpPath/dlt_logstorage.conf + echo "File=Test" >>$tmpPath/dlt_logstorage.conf + echo "FileSize=1000000" >>$tmpPath/dlt_logstorage.conf + echo "NOFiles=1" >>$tmpPath/dlt_logstorage.conf + return 0 +} +#main function +######################################################################################## +cleanup +setupTest |