4 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the License);
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
26 #include "core/list.h"
27 #include "core/common.h"
28 #include "core/udev.h"
29 #include "shared/dbus.h"
31 #ifdef ENABLE_TEST_DLOG
35 #define LOG_TAG "AUTO_TEST"
36 #include "shared/log-macro.h"
38 #define TEST_WAIT_TIME_INTERVAL 5
39 #define METHOD_SET_DEVICE "device_changed"
42 TEST_PRIORITY_NORMAL = 0,
47 enum test_priority priority;
49 void (*init) (void *data);
50 void (*exit) (void *data);
54 int (*unit) (int argc, char **argv);
57 enum test_ops_status {
58 TEST_OPS_STATUS_UNINIT,
59 TEST_OPS_STATUS_START,
64 void test_init(void *data);
65 void test_exit(void *data);
67 static inline int test_start(const struct test_ops *c)
75 static inline int test_stop(const struct test_ops *c)
83 static inline int test_get_status(const struct test_ops *c)
91 #define TEST_OPS_REGISTER(c) \
92 static void __CONSTRUCTOR__ module_init(void) \
96 static void __DESTRUCTOR__ module_exit(void) \
100 DBusMessage *deviced_dbus_method_sync_with_reply(const char *dest, const char *path,
101 const char *interface, const char *method,
102 const char *sig, char *param[]);
103 void add_test(const struct test_ops *c);
104 void remove_test(const struct test_ops *c);
105 const struct test_ops *find_test(const char *name);