summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorLutz Helwing <lutz_helwing@mentor.com>2015-07-13 16:52:14 +0200
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2015-07-21 12:48:27 +0200
commit98e932adee2a76bda3c2630f348196216549a45a (patch)
tree1658983ac5940b71c158da20421db9054f9500ca /src/tests
parent199ff0e7f736d848a7e01a12f04ddb21ecf36d74 (diff)
downloadDLT-daemon-98e932adee2a76bda3c2630f348196216549a45a.tar.gz
Removed all trailing whitespaces
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/CMakeLists.txt2
-rwxr-xr-xsrc/tests/dlt-test-filetransfer-image.pngbin18901 -> 18897 bytes
-rw-r--r--src/tests/dlt-test-filetransfer.c44
-rwxr-xr-xsrc/tests/dlt-test-multi-process.c2
-rw-r--r--src/tests/dlt-test-stress-client.c12
-rw-r--r--src/tests/dlt-test-stress-user.c6
6 files changed, 33 insertions, 33 deletions
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index b1052ca..557e403 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -55,7 +55,7 @@ add_executable(dlt-test-filetransfer ${dlt_test_filetransfer_SRCS})
target_link_libraries(dlt-test-filetransfer dlt)
set_target_properties(dlt-test-filetransfer PROPERTIES LINKER_LANGUAGE C)
-install(TARGETS dlt-test-multi-process dlt-test-multi-process-client dlt-test-user dlt-test-client dlt-test-stress-user dlt-test-stress-client dlt-test-stress dlt-test-filetransfer
+install(TARGETS dlt-test-multi-process dlt-test-multi-process-client dlt-test-user dlt-test-client dlt-test-stress-user dlt-test-stress-client dlt-test-stress dlt-test-filetransfer
RUNTIME DESTINATION bin
COMPONENT base)
diff --git a/src/tests/dlt-test-filetransfer-image.png b/src/tests/dlt-test-filetransfer-image.png
index dbc570e..dac59d3 100755
--- a/src/tests/dlt-test-filetransfer-image.png
+++ b/src/tests/dlt-test-filetransfer-image.png
Binary files differ
diff --git a/src/tests/dlt-test-filetransfer.c b/src/tests/dlt-test-filetransfer.c
index 6374b2d..46a6845 100644
--- a/src/tests/dlt-test-filetransfer.c
+++ b/src/tests/dlt-test-filetransfer.c
@@ -108,7 +108,7 @@ int testFile1Run1(){
//Just some log to the main context
DLT_LOG(mainContext,DLT_LOG_INFO,DLT_STRING("Started testF1P1 - dlt_user_log_file_complete"),DLT_STRING(file1));
- //Here's the line where the dlt file transfer is called. The method call needs a context, the absolute file path, will the file be deleted after transfer and the timeout between the packages
+ //Here's the line where the dlt file transfer is called. The method call needs a context, the absolute file path, will the file be deleted after transfer and the timeout between the packages
transferResult = dlt_user_log_file_complete(&fileContext,file1,0,20);
if(transferResult < 0 )
{
@@ -117,16 +117,16 @@ int testFile1Run1(){
}
//Just some log to the main context
DLT_LOG(mainContext,DLT_LOG_INFO,DLT_STRING("Finished testF1P1"),DLT_STRING(file1));
-
+
printTestResultPositiveExpected(__FUNCTION__,transferResult);
return transferResult;
}
-//!Test the file transfer with the condition that the transferred file is smaller as the file transfer buffer using single package transfer
+//!Test the file transfer with the condition that the transferred file is smaller as the file transfer buffer using single package transfer
int testFile1Run2(){
int total_size, used_size;
-
+
//Get the information how many packages have the file
countPackages = dlt_user_log_file_packagesCount(&fileContext,file1);
if(countPackages < 0 )
@@ -137,8 +137,8 @@ int testFile1Run2(){
}
//Just some log to the main context
DLT_LOG(mainContext,DLT_LOG_INFO,DLT_STRING("Started testF1P2 - transfer single package"),DLT_STRING(file1));
-
- //Logs the header of the file transfer. For more details see Mainpage.c.
+
+ //Logs the header of the file transfer. For more details see Mainpage.c.
//The header gives information about the file serial number, filename (with absolute path), filesize, packages of file, buffer size
transferResult = dlt_user_log_file_header(&fileContext,file1);
if(transferResult >= 0)
@@ -154,7 +154,7 @@ int testFile1Run2(){
break;
}
- //Logs one single package to the file context
+ //Logs one single package to the file context
transferResult = dlt_user_log_file_data(&fileContext,file1,i,20);
if(transferResult < 0)
{
@@ -165,7 +165,7 @@ int testFile1Run2(){
}
//Logs the end of the file transfer. For more details see Mainpage.c
- //The end gives just information about the file serial number but is needed to signal that the file transfer has correctly finished and needed for the file transfer plugin of the dlt viewer.
+ //The end gives just information about the file serial number but is needed to signal that the file transfer has correctly finished and needed for the file transfer plugin of the dlt viewer.
transferResult = dlt_user_log_file_end(&fileContext,file1,0);
if(transferResult < 0)
{
@@ -180,7 +180,7 @@ int testFile1Run2(){
printTestResultPositiveExpected(__FUNCTION__,transferResult);
return transferResult;
}
-
+
//Just some log to main context
DLT_LOG(mainContext,DLT_LOG_INFO,DLT_STRING("Finished testF1P2 - transfer single package"),DLT_STRING(file1));
printTestResultPositiveExpected(__FUNCTION__,transferResult);
@@ -208,7 +208,7 @@ int testFile2Run1(){
//!Test the file transfer with the condition that the transferred file is bigger as the file transfer buffer using single package transfer
int testFile2Run2(){
int total_size, used_size;
-
+
//Get the information how many packages have the file
countPackages = dlt_user_log_file_packagesCount(&fileContext,file2);
if(countPackages < 0 )
@@ -217,16 +217,16 @@ int testFile2Run2(){
printTestResultPositiveExpected(__FUNCTION__,countPackages);
return -1;
}
-
+
//Just some log to the main context
DLT_LOG(mainContext,DLT_LOG_INFO,DLT_STRING("Started testF2P2 - transfer single package"),DLT_STRING(file2));
-
- //Logs the header of the file transfer. For more details see Mainpage.c.
+
+ //Logs the header of the file transfer. For more details see Mainpage.c.
//The header gives information about the file serial number, filename (with absolute path), filesize, packages of file, buffer size
transferResult = dlt_user_log_file_header(&fileContext,file2);
if( transferResult >= 0){
-
- //Loop to log all packages
+
+ //Loop to log all packages
for(i=1;i<=countPackages;i++)
{
dlt_user_check_buffer(&total_size, &used_size);
@@ -271,7 +271,7 @@ int testFile2Run2(){
//!Test the file transfer with the condition that the transferred file does not exist using dlt_user_log_file_complete.
int testFile3Run1(){
-
+
//Just some log to the main context
DLT_LOG(mainContext,DLT_LOG_INFO,DLT_STRING("Started testF3P1"),DLT_STRING(file3_1));
@@ -307,13 +307,13 @@ int testFile3Run2(){
}
//Just some log to the main context
DLT_LOG(mainContext,DLT_LOG_INFO,DLT_STRING("Started testF3P1"),DLT_STRING(file3_2));
-
- //Logs the header of the file transfer. For more details see Mainpage.c.
+
+ //Logs the header of the file transfer. For more details see Mainpage.c.
//The header gives information about the file serial number, filename (with absolute path), filesize, packages of file, buffer size
transferResult = dlt_user_log_file_header(&fileContext,file3_2);
if( transferResult >= 0){
-
- //Loop to log all packages
+
+ //Loop to log all packages
for(i=1;i<=countPackages;i++)
{
//Logs one single package to the file context
@@ -343,10 +343,10 @@ int testFile3Run2(){
//!Logs some information about the file.
int testFile3Run3(){
-
+
//Just some log to the main context
DLT_LOG(mainContext,DLT_LOG_INFO,DLT_STRING("Started testF3P2"),DLT_STRING(file3_3));
-
+
//Here's the line where the dlt file file info is called. The method call logs some information to dlt about the file, filesize, file serial number and number of packages
transferResult = dlt_user_log_file_infoAbout(&fileContext,file3_3);
if(transferResult < 0)
diff --git a/src/tests/dlt-test-multi-process.c b/src/tests/dlt-test-multi-process.c
index 53dbffb..93fd069 100755
--- a/src/tests/dlt-test-multi-process.c
+++ b/src/tests/dlt-test-multi-process.c
@@ -207,7 +207,7 @@ int main(int argc, char **argv)
if(signal(SIGTERM, quit_handler) == SIG_IGN)
signal(SIGTERM, SIG_IGN); // kill (nice)
- printf("Setup done. Listening. My pid: %d\n", getpid());
+ printf("Setup done. Listening. My pid: %d\n", getpid());
fflush(stdout);
int err = wait_for_death();
diff --git a/src/tests/dlt-test-stress-client.c b/src/tests/dlt-test-stress-client.c
index 36044d0..28c2c9e 100644
--- a/src/tests/dlt-test-stress-client.c
+++ b/src/tests/dlt-test-stress-client.c
@@ -116,14 +116,14 @@ typedef struct
int tests_failed;
int sock;
-
+
// test values
unsigned long bytes_received;
unsigned long time_elapsed;
int last_value;
int count_received_messages;
int count_not_received_messages;
-
+
} DltTestclientData;
/**
@@ -489,14 +489,14 @@ int dlt_testclient_message_callback(DltMessage *message, void *data)
DLT_MSG_READ_VALUE(value_tmp,ptr,datalength,int32_t);
value=DLT_ENDIAN_GET_32(message->standardheader->htyp, value_tmp);
//printf("%d\n",value);
-
+
if(value < dltdata->last_value)
{
- if(dltdata->nvalue == dltdata->count_received_messages)
- printf("PASSED: %d Msg received, %d not received\n",dltdata->count_received_messages,dltdata->count_not_received_messages);
+ if(dltdata->nvalue == dltdata->count_received_messages)
+ printf("PASSED: %d Msg received, %d not received\n",dltdata->count_received_messages,dltdata->count_not_received_messages);
else
printf("FAILED: %d Msg received, %d not received\n",dltdata->count_received_messages,dltdata->count_not_received_messages);
-
+
dltdata->last_value = 0;
dltdata->count_received_messages = 0;
dltdata->count_not_received_messages = value -1;
diff --git a/src/tests/dlt-test-stress-user.c b/src/tests/dlt-test-stress-user.c
index 6a6f4a6..355f510 100644
--- a/src/tests/dlt-test-stress-user.c
+++ b/src/tests/dlt-test-stress-user.c
@@ -245,7 +245,7 @@ int testall(int count,int repeat,int delay,int size)
{
buffer[num] = num;
}
-
+
/* Test All: Test all start */
//printf("Test1: Test all\n");
//DLT_LOG(context_info,DLT_LOG_INFO,DLT_STRING("Test1: Test all"));
@@ -258,11 +258,11 @@ int testall(int count,int repeat,int delay,int size)
usleep(delay);
}
}
-
+
/* wait 5 seconds after test */
//sleep(5);
//DLT_LOG(context_info,DLT_LOG_INFO,DLT_STRING("Test1: finished"));
-
+
return 0;
}