[v4,3/8] app/test: make telemetry data test buildable on windows

Message ID 20230815131320.375088-4-bruce.richardson@intel.com (mailing list archive)
State New
Headers
Series expand list of optional libraries |

Commit Message

Bruce Richardson Aug. 15, 2023, 1:13 p.m. UTC
  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>
---
 app/test/test_telemetry_data.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
  

Patch

diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c
index a960f44c1b..b2dc1d75db 100644
--- a/app/test/test_telemetry_data.c
+++ b/app/test/test_telemetry_data.c
@@ -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);