From 371214dea7f92b3170d0239b3d9944275adf951a Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 27 Jun 2022 12:32:13 +0200 Subject: Remove network dependency for tests with UNC paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Windows VMs are provisioned with shared folders that are available as \\${COMPUTERNAME}\testshare(writable) so we don't need to access a remote SMB server over network anymore just to test whether our string-parsing code handles UNC paths correctly. Add a QTest::uncServerName() helper function to the shared filesystem.h header and use that instead of QtNetworkSettings::winServerName. The latter is now only used in tst_NetworkSelfTest::smbServer(). Pick-to: 6.4 Change-Id: Id0da66369ad0f4a980d612de2a31a391f1192253 Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Thiago Macieira Reviewed-by: Edward Welbourne --- tests/shared/filesystem.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/shared') diff --git a/tests/shared/filesystem.h b/tests/shared/filesystem.h index 45ee41c85b..b59baf69b6 100644 --- a/tests/shared/filesystem.h +++ b/tests/shared/filesystem.h @@ -25,6 +25,9 @@ #ifndef SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE // MinGW #define SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE (0x2) #endif +namespace QTest { + static QString uncServerName() { return qgetenv("COMPUTERNAME"); } +} #endif // QTemporaryDir-based helper class for creating file-system hierarchies and cleaning up. -- cgit v1.2.3