blob: e823de2e6ee09573c70d450931abc17d6071b717 [file] [log] [blame]
Harshit Agheraa3f24f42025-04-21 20:04:56 +05301gtest_dep = dependency('gtest', main: true, disabler: true, required: false)
2gmock_dep = dependency('gmock', disabler: true, required: false)
3if not gtest_dep.found() or not gmock_dep.found()
4 gtest_proj = import('cmake').subproject('googletest', required: true)
5 gtest_dep = declare_dependency(
6 dependencies: [
7 dependency('threads'),
8 gtest_proj.dependency('gtest'),
9 gtest_proj.dependency('gtest_main'),
10 ],
11 )
12 gmock_dep = gtest_proj.dependency('gmock')
13endif
14
15gpusensor_test_include_dirs = [gpusensor_include_dir]
16
17test(
18 'gpusensor_test',
19 executable(
20 'gpusensor_test',
21 'GpuSensorTest.cpp',
22 '../OcpMctpVdm.cpp',
23 '../GpuMctpVdm.cpp',
24 implicit_include_directories: false,
25 include_directories: gpusensor_test_include_dirs,
26 dependencies: [gtest_dep, gmock_dep],
27 ),
28 workdir: meson.current_source_dir(),
29)