summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorihuerner <ihuerner@b9707d8c-442e-47db-affb-152dabb2260b>2012-08-23 08:19:16 +0000
committerihuerner <ihuerner@b9707d8c-442e-47db-affb-152dabb2260b>2012-08-23 08:19:16 +0000
commitf27098df091819c7eb467607b0ceeb1739a0add4 (patch)
tree530a67dc65d76f681012ebf29532e51618c74b33 /test
parent715e5666dcb9fe8a0e7ac351658d4c359fdb9354 (diff)
downloadpersistence-client-library-f27098df091819c7eb467607b0ceeb1739a0add4.tar.gz
Updated test resource config table batabases; implemented loading of custom libraries; implemented correct handling of resource config table databases; moved some helper function to new file persistence_client_library_access_helper.c (rev. 1313)
Diffstat (limited to 'test')
-rw-r--r--test/customLibConfigFile.cfg7
-rw-r--r--test/persistence_client_library_test.c60
2 files changed, 52 insertions, 15 deletions
diff --git a/test/customLibConfigFile.cfg b/test/customLibConfigFile.cfg
new file mode 100644
index 0000000..dd82d8f
--- /dev/null
+++ b/test/customLibConfigFile.cfg
@@ -0,0 +1,7 @@
+secure /usr/local/lib/libsecurePersCustom.so
+early /usr/local/lib/libearlyperscustom.so
+custom2 /usr/local/lib/libcustom2PersCustom.so
+hwinfo /usr/local/lib/libHWinfoPersCustom.so
+custom1 /usr/local/lib/libcustom1PersCustom.so
+emergency /usr/local/lib/libemergencyPersCustom.so
+custom3 /usr/local/lib/libcustom3PersCustom.so \ No newline at end of file
diff --git a/test/persistence_client_library_test.c b/test/persistence_client_library_test.c
index e0f2bcd..48f79e3 100644
--- a/test/persistence_client_library_test.c
+++ b/test/persistence_client_library_test.c
@@ -70,41 +70,74 @@ START_TEST (test_persGetData)
locTime->tm_hour, locTime->tm_min, locTime->tm_sec);
printf("\n\n");
+ printf("<-----------------------------------------------\n");
memset(buffer, 0, READ_SIZE);
- ret = key_read_data(0xFF, "/pos/last_position", 0, 0, buffer, READ_SIZE); // "/Data/mnt-c/Appl-1/cached.gvdb" => "/Node/pos/last position"
- printf("T E S T Data: %s \n\n", buffer);
+ ret = key_read_data(0xFF, "/language/country_code", 0, 0, buffer, READ_SIZE); // "/Data/mnt-c/Appl-1/cached.gvdb" => "/Node/pos/last position"
+ printf("T E S T Data - country_code: %s \n", buffer);
+ printf("----------------------------------------------->\n\n");
+
+
+ printf("<-----------------------------------------------\n");
+ memset(buffer, 0, READ_SIZE);
+ ret = key_read_data(0xFF, "/pos/last_position", 0, 0, buffer, READ_SIZE); // "/Data/mnt-c/Appl-1/cached.gvdb" => "/Node/pos/last position"
+ printf("T E S T Data - last_position: %s \n", buffer);
+ printf("----------------------------------------------->\n\n");
+
+ printf("<-----------------------------------------------\n");
memset(buffer, 0, READ_SIZE);
ret = key_read_data(0, "/language/current_language", 3, 0, buffer, READ_SIZE); // "/Data/mnt-wt/Shared/Public/wt.dconf" => "/User/3/language/current_language"
- printf("T E S T Data: %s \n\n", buffer);
+ printf("T E S T Data - current_language: %s \n", buffer);
+ printf("----------------------------------------------->\n\n");
+
+ printf("<-----------------------------------------------\n");
memset(buffer, 0, READ_SIZE);
ret = key_read_data(0xFF, "/status/open_document", 3, 2, buffer, READ_SIZE); // "/Data/mnt-c/Appl-1/cached.gvdb" => "/User/3/Seat/2/status/open_document"
- printf("T E S T Data: %s \n\n", buffer);
+ printf("T E S T Data - open_document: %s \n", buffer);
+ printf("----------------------------------------------->\n\n");
+
+ printf("<-----------------------------------------------\n");
memset(buffer, 0, READ_SIZE);
ret = key_read_data(0x20, "/address/home_address", 4, 0, buffer, READ_SIZE); // "/Data/mnt-c/Shared/Group/20/cached.dconf" => "/User/4/address/home_address"
- printf("T E S T Data: %s \n\n", buffer);
+ printf("T E S T Data - home_address: %s \n", buffer);
+ printf("----------------------------------------------->\n\n");
+
+ printf("<-----------------------------------------------\n");
memset(buffer, 0, READ_SIZE);
ret = key_read_data(0xFF, "/pos/last satellites", 0, 0, buffer, READ_SIZE); // "/Data/mnt-wt/Appl-1/wt.gvdb" => "/Node/pos/last satellites"
- printf("T E S T Data: %s \n\n", buffer);
+ printf("T E S T Data - last satellites: %s \n", buffer);
+ printf("----------------------------------------------->\n\n");
+
+ printf("<-----------------------------------------------\n");
memset(buffer, 0, READ_SIZE);
ret = key_read_data(0x84, "/links/last link", 2, 0, buffer, READ_SIZE); // "/Data/mnt-wt/Appl-2/wt.gvdb" => "/84/User/2/links/last link"
- printf("T E S T Data: %s \n\n", buffer);
+ printf("T E S T Data - last link: %s \n", buffer);
+ printf("----------------------------------------------->\n\n");
+
+ printf("<-----------------------------------------------\n");
memset(buffer, 0, READ_SIZE);
ret = key_read_data(0x84, "/links/last link", 2, 1, buffer, READ_SIZE); // "/Data/mnt-wt/Appl-2/wt.gvdb" => "/84/User/2/links/last link"
- printf("T E S T Data: %s \n\n", buffer);
+ printf("T E S T Data - last link: %s \n", buffer);
+ printf("----------------------------------------------->\n\n");
+
+ printf("<-----------------------------------------------\n");
memset(buffer, 0, READ_SIZE);
ret = key_write_data(0x84, "/links/last link", 2, 1, sysTimeBuffer, READ_SIZE); // "/Data/mnt-wt/Appl-2/wt.gvdb" => "/84/User/2/Seat/1/links/last link"
printf("T E S T Data: %s \n\n", sysTimeBuffer);
+ printf("----------------------------------------------->\n\n");
+
- memset(buffer, 0, READ_SIZE);
+ printf("<-----------------------------------------------\n");
+ memset(buffer, 0, READ_SIZE);
ret = key_read_data(0x84, "/links/last link", 2, 1, buffer, READ_SIZE); // "/Data/mnt-wt/Appl-2/wt.gvdb" => "/84/User/2/Seat/1/links/last link"
- printf("T E S T Data: %s \n\n", buffer);
+ printf("T E S T Data last link: %s \n", buffer);
+ printf("----------------------------------------------->\n\n");
@@ -229,11 +262,11 @@ static Suite * persistencyClientLib_suite()
tcase_add_test(tc_persGetData_file, test_persGetData_file);
suite_add_tcase(s, tc_persGetData);
- suite_add_tcase(s, tc_persGetDataHandle);
+ /*suite_add_tcase(s, tc_persGetDataHandle);
suite_add_tcase(s, tc_persSetData);
suite_add_tcase(s, tc_persSetSharedData);
suite_add_tcase(s, tc_persGetData_file);
-
+*/
return s;
}
@@ -250,9 +283,6 @@ int main(int argc, char *argv[])
nr_failed = srunner_ntests_failed(sr);
srunner_free(sr);
-
- getchar();
-
return (0==nr_failed)?EXIT_SUCCESS:EXIT_FAILURE;
}