From 0902c7480984f194683e306255c9fad4eb4b0f3f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 3 Aug 2020 10:01:52 +0200 Subject: [PATCH] [hostinfo] Editorialize on the tests - the implementation understands Intel and AMD, but the test was written for my desktop machine (which fails elsewhere). SEE #1471 --- src/modules/hostinfo/Tests.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/hostinfo/Tests.cpp b/src/modules/hostinfo/Tests.cpp index 8241ef022..8182da365 100644 --- a/src/modules/hostinfo/Tests.cpp +++ b/src/modules/hostinfo/Tests.cpp @@ -59,7 +59,12 @@ HostInfoTests::testHostOS() QCOMPARE( expect, hostOS() ); QCOMPARE( expect, hostOSName() ); // Might be the same - QCOMPARE( QStringLiteral( "Intel" ), hostCPU() ); // On all my developer machines + + // This is a lousy test, too: the implementation reads /proc/cpuinfo + // and that's the only way we could use, too, to find what the "right" + // answer is. + QStringList cpunames{ QStringLiteral( "Intel" ), QStringLiteral( "AMD" ) }; + QVERIFY( cpunames.contains( hostCPU() ) ); }