[v6,04/11] app/test: make telemetry data test buildable on windows
Checks
Commit Message
To enable the building of the telemetry data tests file when building on
windows, we need to provide a stub implementation. That way, the test
file is buildable any time the library itself is built.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
app/test/test_telemetry_data.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
Comments
On Wed, Aug 16, 2023 at 04:34:32PM +0100, Bruce Richardson wrote:
> To enable the building of the telemetry data tests file when building on
> windows, we need to provide a stub implementation. That way, the test
> file is buildable any time the library itself is built.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Morten Brørup <mb@smartsharesystems.com>
> ---
let me also ack the latest v6
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
@@ -2,11 +2,20 @@
* Copyright 2020 Intel Corporation
*/
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include "test.h"
+
+static int
+telemetry_data_autotest(void)
+{
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <string.h>
#include <sys/socket.h>
-#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/un.h>
-#endif
#include <unistd.h>
#include <limits.h>
@@ -604,5 +613,6 @@ telemetry_data_autotest(void)
close(sock);
return 0;
}
+#endif /* windows/non-windows */
REGISTER_TEST_COMMAND(telemetry_data_autotest, telemetry_data_autotest);