tests: make it work aka hide HUDElements

Currently the test is pulling an external reference to HUDElements,
which is unresolved so the test fails to link.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
pull/950/head
Emil Velikov 1 year ago committed by flightlessmango
parent d84c85609a
commit 047bc2e7f7

@ -271,6 +271,7 @@ if get_option('tests').enabled()
'src/mesa/util/os_time.c',
'src/file_utils.cpp',
),
cpp_args: ['-DTEST_ONLY'],
dependencies: [
cmocka_dep,
spdlog_dep,

@ -156,9 +156,11 @@ void amdgpu_metrics_polling_thread() {
memset(metrics_buffer, 0, sizeof(metrics_buffer));
while (1) {
#ifndef TEST_ONLY
if (HUDElements.params->no_display && !logger->is_active())
usleep(100000);
else
#endif
amdgpu_get_samples_and_copy(metrics_buffer, gpu_load_needs_dividing);
}
}

Loading…
Cancel
Save