-unittest_util_static = static_library('unittest_util',
- files('unittest_util.c'),
- dependencies: [glib_dep],
- install: false,
-)
-
unittest_capi_inference_single = executable('unittest_capi_inference_single',
'unittest_capi_inference_single.cc',
dependencies: [nns_capi_single_dep, gtest_dep],
)
test('unittest_capi_inference_single', unittest_capi_inference_single, env: testenv, timeout: 100)
-unittest_common_dep = declare_dependency(
- link_with: [unittest_util_static],
- dependencies: [nns_capi_dep, gtest_dep],
- compile_args: ['-DFAKEDLOG=1'],
- include_directories: nns_capi_include,
-)
-
unittest_capi_inference = executable('unittest_capi_inference',
'unittest_capi_inference.cc',
dependencies: [unittest_common_dep],
testenv.set('MLAPI_SOURCE_ROOT_PATH', meson.source_root())
testenv.set('MLAPI_BUILD_ROOT_PATH', meson.build_root())
-gtest_dep = dependency('gtest', required: false)
-if gtest_dep.found()
- if get_option('enable-ml-service')
- gdbus_gen_test_src = custom_target('gdbus-gencode-test',
- input: test_dbus_input,
- output: ['test-dbus.h', 'test-dbus.c'],
- command: [gdbus_prog, '--interface-prefix', 'org.tizen',
- '--generate-c-code', 'test-dbus',
- '--output-directory', meson.current_build_dir(),
- '@INPUT@'])
-
- gdbus_gen_header_test_dep = declare_dependency(sources: gdbus_gen_test_src,
- dependencies: gdbus_gen_header_dep)
-
- nns_ml_agent_common_objs = nns_ml_agent_executable.extract_objects(nns_ml_agent_common_srcs)
- executable('machine-learning-agent-test',
- [nns_ml_agent_service_db_srcs, files('daemon/test-dbus-impl.c')],
- dependencies: [ai_service_daemon_deps, gdbus_gen_header_test_dep],
- include_directories: nns_ml_agent_incs,
- objects: [nns_ml_agent_common_objs],
- cpp_args: [daemon_cpp_db_key_prefix_arg, '-DDB_PATH="."']
- )
-
- test_db_config_args = declare_dependency(
- compile_args: ['-DDB_PATH="."', daemon_cpp_db_key_prefix_arg])
-
- service_db_dep_for_test = declare_dependency(
- sources: files('../daemon/service-db.cc'),
- dependencies: [glib_dep, sqlite_dep, test_db_config_args],
- include_directories: nns_ml_agent_incs
- )
- endif
-
- subdir('capi')
- if get_option('enable-ml-service')
- subdir('services')
- subdir('daemon')
- endif
-else
- warning('You should install google-test on your machine.')
+unittest_util_static = static_library('unittest_util',
+ files('capi/unittest_util.c'),
+ dependencies: [glib_dep],
+ install: false,
+)
+
+unittest_common_dep = declare_dependency(
+ link_with: [unittest_util_static],
+ dependencies: [nns_capi_dep, gtest_dep],
+ compile_args: ['-DFAKEDLOG=1'],
+ include_directories: nns_capi_include,
+)
+
+if get_option('enable-ml-service')
+ gdbus_gen_test_src = custom_target('gdbus-gencode-test',
+ input: test_dbus_input,
+ output: ['test-dbus.h', 'test-dbus.c'],
+ command: [gdbus_prog, '--interface-prefix', 'org.tizen',
+ '--generate-c-code', 'test-dbus',
+ '--output-directory', meson.current_build_dir(),
+ '@INPUT@'])
+
+ gdbus_gen_header_test_dep = declare_dependency(sources: gdbus_gen_test_src,
+ dependencies: gdbus_gen_header_dep)
+
+ nns_ml_agent_common_objs = nns_ml_agent_executable.extract_objects(nns_ml_agent_common_srcs)
+ executable('machine-learning-agent-test',
+ [nns_ml_agent_service_db_srcs, files('daemon/test-dbus-impl.c')],
+ dependencies: [ai_service_daemon_deps, gdbus_gen_header_test_dep],
+ include_directories: nns_ml_agent_incs,
+ objects: [nns_ml_agent_common_objs],
+ cpp_args: [daemon_cpp_db_key_prefix_arg, '-DDB_PATH="."']
+ )
+
+ test_db_config_args = declare_dependency(
+ compile_args: ['-DDB_PATH="."', daemon_cpp_db_key_prefix_arg])
+
+ service_db_dep_for_test = declare_dependency(
+ sources: files('../daemon/service-db.cc'),
+ dependencies: [glib_dep, sqlite_dep, test_db_config_args],
+ include_directories: nns_ml_agent_incs
+ )
+
+ subdir('services')
+ subdir('daemon')
endif
+subdir('capi')
+
if get_option('install-test')
install_subdir('test_models', install_dir: unittest_install_dir)
endif