virfiletest: Load mock on Linux only

The mock is built on Linux only. Therefore we should load it only
on Linux too. This fixes the FreeBSD build.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Michal Privoznik 2018-10-11 10:36:02 +02:00
parent 1dbf6222dd
commit c570d05175
1 changed files with 4 additions and 0 deletions

View File

@ -460,4 +460,8 @@ mymain(void)
return ret != 0 ? EXIT_FAILURE : EXIT_SUCCESS; return ret != 0 ? EXIT_FAILURE : EXIT_SUCCESS;
} }
#ifdef __linux__
VIR_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/virfilemock.so") VIR_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/virfilemock.so")
#else
VIR_TEST_MAIN(mymain)
#endif