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

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

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