diff options
author | Lutz Helwing <lutz_helwing@mentor.com> | 2015-10-08 18:07:21 +0200 |
---|---|---|
committer | Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> | 2015-10-28 11:37:05 +0100 |
commit | a65dcd34513308b37165f8544ab647016d6e7209 (patch) | |
tree | 1d8786162fdf24a719b5934982b8f892c5ab076a /src/tests/dlt-test-filetransfer.c | |
parent | d781908d0006d3a8b681d95540558d3a231d9c79 (diff) | |
download | DLT-daemon-a65dcd34513308b37165f8544ab647016d6e7209.tar.gz |
Set DLT_USER_BUF_MAX_SIZE to 1390 to prepare UDP message transport
dlt-test-client and dlt-test-filetransfer have global failed test counter so they can return 1 on failure
Using DLT_USER_BUF_MAX_SIZE in dlt-test-client.c truncated check
Set path to /usr/local/share/ in dlt-test-filetransfer.c
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
Diffstat (limited to 'src/tests/dlt-test-filetransfer.c')
-rw-r--r-- | src/tests/dlt-test-filetransfer.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tests/dlt-test-filetransfer.c b/src/tests/dlt-test-filetransfer.c index 8c4b5c3..5ec4114 100644 --- a/src/tests/dlt-test-filetransfer.c +++ b/src/tests/dlt-test-filetransfer.c @@ -76,6 +76,7 @@ char *file3_2; char *file3_3; //!Just some variables int i,countPackages, transferResult; +static int g_numFailed = 0; //!Prints the test result void printTestResultPositiveExpected(const char *function, int result){ @@ -86,6 +87,7 @@ void printTestResultPositiveExpected(const char *function, int result){ else { printf("%s failed\n",function); + g_numFailed++; } } @@ -99,6 +101,7 @@ void printTestResultNegativeExpected(const char *function, int result){ else { printf("%s failed\n",function); + g_numFailed++; } } @@ -366,9 +369,9 @@ int testFile3Run3(){ int main(void) { //First file contains some text - file1 = "/usr/share/dlt-filetransfer/dlt-test-filetransfer-file"; + file1 = "/usr/local/share/dlt-filetransfer/dlt-test-filetransfer-file"; //Second file is a picture - file2 = "/usr/share/dlt-filetransfer/dlt-test-filetransfer-image.png"; + file2 = "/usr/local/share/dlt-filetransfer/dlt-test-filetransfer-image.png"; //Third file doesn't exist. Just to test the reaction when the file isn't available. file3_1 = "dlt-test-filetransfer-doesntExist_1"; //Third file doesn't exist. Just to test the reaction when the file isn't available. @@ -401,5 +404,5 @@ int main(void) //Unregister the app from the dlt-daemon DLT_UNREGISTER_APP(); - return(0); + return g_numFailed == 0 ? 0 : 1; } |