summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.travis/gtest_dlt_all.sh5
-rw-r--r--tests/gtest_dlt_daemon_gateway.cpp2
-rwxr-xr-xtests/gtest_dlt_daemon_gateway.sh16
3 files changed, 21 insertions, 2 deletions
diff --git a/.travis/gtest_dlt_all.sh b/.travis/gtest_dlt_all.sh
index ecc4188..4273859 100755
--- a/.travis/gtest_dlt_all.sh
+++ b/.travis/gtest_dlt_all.sh
@@ -51,9 +51,14 @@ gtest_run_test gtest_dlt_daemon_common
gtest_run_test gtest_dlt_daemon_event_handler
+# Without General section in dlt_gateway.conf
./gtest_dlt_daemon_gateway.sh > /dev/null
gtest_run_test gtest_dlt_daemon_gateway
+# With General section in dlt_gateway.conf
+./gtest_dlt_daemon_gateway.sh -w > /dev/null
+gtest_run_test gtest_dlt_daemon_gateway
+
./gtest_dlt_daemon_logstorage.sh > /dev/null
gtest_run_test gtest_dlt_daemon_offline_log
diff --git a/tests/gtest_dlt_daemon_gateway.cpp b/tests/gtest_dlt_daemon_gateway.cpp
index b0cd229..8b293bb 100644
--- a/tests/gtest_dlt_daemon_gateway.cpp
+++ b/tests/gtest_dlt_daemon_gateway.cpp
@@ -321,7 +321,7 @@ TEST(t_dlt_gateway_check_timeout, abnormal)
{
DltGatewayConnection tmp;
DltGatewayConnection *con;
- char value[DLT_CONFIG_FILE_ENTRY_MAX_LEN] = "0";
+ char value[DLT_CONFIG_FILE_ENTRY_MAX_LEN] = "-1";
con = &tmp;
EXPECT_EQ(DLT_RETURN_ERROR, dlt_gateway_check_timeout(con, value));
diff --git a/tests/gtest_dlt_daemon_gateway.sh b/tests/gtest_dlt_daemon_gateway.sh
index d74f519..4d952e5 100755
--- a/tests/gtest_dlt_daemon_gateway.sh
+++ b/tests/gtest_dlt_daemon_gateway.sh
@@ -153,6 +153,13 @@ setupTest()
echo "Error in creating dlt_gateway file"
return 1
fi
+
+ if [ $# -eq 1 ] && [ "$1" == "1" ]
+ then
+ echo "[General]" >>$tmpPath/dlt_gateway.conf
+ echo "Interval=1">>$tmpPath/dlt_gateway.conf
+ fi
+
echo "[PassiveNode1]" >>$tmpPath/dlt_gateway.conf
echo "IPaddress=$ipaddr">>$tmpPath/dlt_gateway.conf
echo "Port=3490" >>$tmpPath/dlt_gateway.conf
@@ -235,7 +242,14 @@ then
fi
echo "Initializing test"
-setupTest
+
+if [ $# -eq 1 ] && [ "$1" == "-w" ]
+then
+ echo "Including General section in dlt_gateway.conf"
+ setupTest 1
+else
+ setupTest
+fi
if [ $? -ne '0' ]
then