Re: [PATCH v9 9/9] app/test: enable subset of unit tests on Windows
From: Jie Zhou <hidden>
Date: 2021-12-01 18:52:32
From: Jie Zhou <hidden>
Date: 2021-12-01 18:52:32
On Wed, Dec 01, 2021 at 10:45:35AM -0800, Stephen Hemminger wrote:
On Wed, 1 Dec 2021 10:05:38 -0800 Jie Zhou [off-list ref] wrote:quoted
diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c index b206db27ae..c2ea9090cf 100644 --- a/app/test/test_dmadev.c +++ b/app/test/test_dmadev.c@@ -2,6 +2,17 @@ * Copyright(c) 2021 HiSilicon Limited * Copyright(c) 2021 Intel Corporation */ +#include "test.h" + +#ifdef RTE_EXEC_ENV_WINDOWS +static int +test_dma(void) +{ + printf("dma not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} + +#elseRather than littering code with ifdefs is it not possible to just not build these tests on Windows?
Originally I took the approach not building on Windows, but then the community reached to a point that instead of maintaining two lists of source files to be build on Windows and on non-Windows, we use the same list, and add test stubs for not-yet-supported-on-windows ones.