3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
20 #include <sync_agent.h>
23 POSITIVE_TC_IDX = 0x01,
27 static void startup(void);
28 static void cleanup(void);
30 void (*tet_startup) (void) = startup;
31 void (*tet_cleanup) (void) = cleanup;
33 #define TEST_FW_CONFIG_FILE_P "../../../testcase/fw-test-cfg/test_fw_config.xml"
34 #define TEST_FW_CONFIG_FILE_N "../../../testcase/fw-test-cfg/test_fw_config_not_existing.xml"
36 #define API_NAME_SYNC_AGENT_INIT "sync_agent_init"
37 #define API_NAME_SYNC_AGENT_DEINIT "sync_agent_deinit"
39 static void utc_sync_agent_framework_sync_agent_init_p(void);
40 static void utc_sync_agent_framework_sync_agent_init_n(void);
41 static void utc_sync_agent_framework_sync_agent_deinit_p(void);
42 static void utc_sync_agent_framework_sync_agent_deinit_n(void);
44 struct tet_testlist tet_testlist[] = {
45 {utc_sync_agent_framework_sync_agent_init_p, POSITIVE_TC_IDX},
46 {utc_sync_agent_framework_sync_agent_init_n, NEGATIVE_TC_IDX},
47 {utc_sync_agent_framework_sync_agent_deinit_p, POSITIVE_TC_IDX},
48 {utc_sync_agent_framework_sync_agent_deinit_n, NEGATIVE_TC_IDX},
52 static void startup(void)
57 static void cleanup(void)
62 static void utc_sync_agent_framework_sync_agent_init_p(void)
64 char *api_name = API_NAME_SYNC_AGENT_INIT;
66 sync_agent_init_error_e init_error = sync_agent_init(TEST_FW_CONFIG_FILE_P);
67 if (init_error != SYNC_AGENT_INIT_SUCCESS) {
68 dts_message(api_name, "sync_agent_init : %d", init_error);
75 static void utc_sync_agent_framework_sync_agent_init_n(void)
77 char *api_name = API_NAME_SYNC_AGENT_INIT;
79 sync_agent_init_error_e init_error = sync_agent_init(TEST_FW_CONFIG_FILE_N);
80 if (init_error != SYNC_AGENT_INIT_SUCCESS) {
83 dts_message(api_name, "sync_agent_init : %d", init_error);
88 static void utc_sync_agent_framework_sync_agent_deinit_p(void)
90 char *api_name = API_NAME_SYNC_AGENT_DEINIT;
92 sync_agent_init_error_e init_error = sync_agent_deinit();
93 if (init_error != SYNC_AGENT_INIT_SUCCESS) {
94 dts_message(api_name, "sync_agent_deinit : %d", init_error);
101 static void utc_sync_agent_framework_sync_agent_deinit_n(void)
103 char *api_name = API_NAME_SYNC_AGENT_DEINIT;
105 // Trying to deinitialize without initializing..
106 sync_agent_init_error_e init_error = sync_agent_deinit();
107 if (init_error != SYNC_AGENT_INIT_SUCCESS) {
110 dts_message(api_name, "sync_agent_deinit : %d", init_error);