Skip to content

Commit 0385651

Browse files
committed
Skip the tests on windows
1 parent 69f7439 commit 0385651

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

tests/test_fake_cpuinfo.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66
#include <archspec/archspec.hpp>
77
#include <algorithm>
88
#include <cstdlib>
9+
#include <filesystem>
910
#include <fstream>
1011
#include <map>
1112
#include <set>
1213
#include <sstream>
1314

1415
using namespace archspec;
1516

17+
namespace fs = std::filesystem;
18+
1619
// Parse cpuinfo content (similar to detect_from_proc_cpuinfo but takes string input)
1720
DetectedCpuInfo parse_cpuinfo_content(const std::string& content, const std::string& arch) {
1821
DetectedCpuInfo info;
@@ -339,6 +342,16 @@ int main() {
339342
std::cout << "=== archspec_cpp Fake cpuinfo Tests ===" << std::endl;
340343
std::cout << std::endl;
341344

345+
#if defined(_WIN32) || defined(_WIN64)
346+
// Skip these tests on Windows - they test Linux /proc/cpuinfo parsing
347+
// which is not relevant to Windows
348+
std::cout << "Skipping tests on Windows (Linux-specific cpuinfo tests)" << std::endl;
349+
std::cout << std::endl;
350+
std::cout << "=== Results ===" << std::endl;
351+
std::cout << "Passed: 0 (skipped)" << std::endl;
352+
std::cout << "Failed: 0" << std::endl;
353+
return 0;
354+
#else
342355
// x86_64 tests (Intel)
343356
RUN_TEST(fake_cpuinfo_haswell);
344357
RUN_TEST(fake_cpuinfo_broadwell);
@@ -358,4 +371,5 @@ int main() {
358371
std::cout << "Failed: " << g_tests_failed << std::endl;
359372

360373
return g_tests_failed > 0 ? 1 : 0;
374+
#endif
361375
}

0 commit comments

Comments
 (0)