Forwarded upstream: https://lists.gnu.org/archive/html/jami/2024-01/msg00010.html From 1d3b044c85c32341cca392254fe8bbf34a4639e1 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 9 Jan 2024 11:14:04 -0500 Subject: [PATCH] tests: Skip tests that need Internet when there's none. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * tests/unittests/messageparser_unittest.cpp (ALinkIsParsedCorrectly) (YoutubeLinkIsParsedCorrectly): Skip when there is no Internet. Series-to: jami@gnu.org Series-cc: Sébastien Blin Fixes: Change-Id: I0a5b57cd82f93fd7edf3fbeb73fb3db5a04c628c --- tests/unittests/messageparser_unittest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unittests/messageparser_unittest.cpp b/tests/unittests/messageparser_unittest.cpp index c10b0d0b..df7a0692 100644 --- a/tests/unittests/messageparser_unittest.cpp +++ b/tests/unittests/messageparser_unittest.cpp @@ -69,6 +69,9 @@ TEST_F(MessageParserFixture, TextIsParsedCorrectly) */ TEST_F(MessageParserFixture, ALinkIsParsedCorrectly) { + if (!globalEnv.connectivityMonitor->isOnline()) + GTEST_SKIP() << "ALinkIsParsedCorrectly requires Internet connectivity"; + auto linkColor = QColor::fromRgb(0, 0, 255); auto backgroundColor = QColor::fromRgb(0, 0, 255); @@ -174,6 +177,9 @@ TEST_F(MessageParserFixture, FencedCodeIsParsedCorrectly) */ TEST_F(MessageParserFixture, YoutubeLinkIsParsedCorrectly) { + if (!globalEnv.connectivityMonitor->isOnline()) + GTEST_SKIP() << "YoutubeLinkIsParsedCorrectly requires Internet connectivity"; + auto url = "https://www.youtube.com/watch?v=1234567890"; auto msg = "blah blah " + QString(url) + " blah blah"; base-commit: a4300308dc8d03d59f620bb5fed753df5cf31ed9 prerequisite-patch-id: 90a419e7de1f4fa5bb68bc58ad0da2817ed268e0 -- 2.41.0
AgeCommit message (Expand)Author
2020-04-06installer: Adapt to Guile-newt revision 2....* gnu/installer/newt/page.scm (run-input-page): Remove component argument that is not longer passed to the procedure passed to 'add-component-callback', (run-listbox-selection-page): ditto. * gnu/installer/newt/user.scm (run-user-add-page): Ditto, (run-user-add-page): ditto. Mathieu Othacehe
2020-03-05installer: Implement a dialog on /var/guix/installer-socket....This will allow us to automate testing of the installer. * gnu/installer/utils.scm (%client-socket-file) (current-server-socket, current-clients): New variables. (open-server-socket, call-with-server-socket): New procedure. (with-server-socket): New macro. (run-shell-command): Add call to 'send-to-clients'. Select on both current-input-port and current-clients. * gnu/installer/steps.scm (run-installer-steps): Wrap 'call-with-prompt' in 'with-socket-server'. Call 'sigaction' for SIGPIPE. * gnu/installer/newt/page.scm (watch-clients!, close-port-and-reuse-fd) (run-form-with-clients, send-to-clients): New procedures. (draw-info-page): Add call to 'run-form-with-clients'. (run-input-page): Likewise. Handle EXIT-REASON equal to 'exit-fd-ready. (run-confirmation-page): Likewise. (run-listbox-selection-page): Likewise. Define 'choice->item' and use it. (run-checkbox-tree-page): Likewise. (run-file-textbox-page): Add call to 'run-form-with-clients'. Handle 'exit-fd-ready'. * gnu/installer/newt/partition.scm (run-disk-page): Pass #:client-callback-procedure to 'run-listbox-selection-page'. * gnu/installer/newt/user.scm (run-user-page): Call 'run-form-with-clients'. Handle 'exit-fd-ready'. * gnu/installer/newt/welcome.scm (run-menu-page): Define 'choice->item' and use it. Call 'run-form-with-clients'. * gnu/installer/newt/final.scm (run-install-success-page) (run-install-failed-page): When (current-clients) is non-empty, call 'send-to-clients' without displaying a choice window. Ludovic Courtès
2020-01-23installer: Make "TRANSLATORS" comment visible....* gnu/installer/newt/user.scm (run-root-password-page): Move "TRANSLATORS" comment right above 'G_' call. Ludovic Courtès