gtest_dep = dependency('gtest', main: true, disabler: true, required: false)
gmock_dep = dependency('gmock', disabler: true, required: false)
if not gtest_dep.found() or not gmock_dep.found()
    gtest_proj = import('cmake').subproject('googletest', required: false)
    if gtest_proj.found()
        gtest_dep = declare_dependency(
            dependencies: [
                dependency('threads'),
                gtest_proj.dependency('gtest'),
                gtest_proj.dependency('gtest_main'),
            ],
        )
        gmock_dep = gtest_proj.dependency('gmock')
    else
        assert(
            not get_option('tests').allowed(),
            'Googletest is required if tests are enabled',
        )
    endif
endif

ut_deps_list = [
    gtest_dep,
]

ut_deps_list += default_deps
src_inc = include_directories('..')

test(
    'test_utils',
    executable(
        'test_utils',
        'test_Utils.cpp',
        '../Utils.cpp',
        dependencies: ut_deps_list,
        implicit_include_directories: false,
        include_directories: src_inc,
    ),
)

test(
    'test_ipmb',
    executable(
        'test_ipmb',
        '../ipmb/IpmbSensor.cpp',
        '../Utils.cpp',
        '../ipmb/IpmbSDRSensor.cpp',
        'test_IpmbSensor.cpp',
        dependencies: ut_deps_list,
        link_with: [
            utils_a,
            thresholds_a,
            devicemgmt_a
        ],
        implicit_include_directories: false,
        include_directories: src_inc,
    ),
)
