From 9b68b484bdb7a92944990a6bdd34d6ddbd48916e Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 22 Jun 2020 16:27:18 -0400 Subject: [PATCH 1/4] Run integration tests on Windows on GitHub Actions Integration tests are currently not run on Windows, because they turned out to be a little unreliable: sometimes they fail, and when that happens restarting the test would make things pass. We will re-enable them and see what happens. --- .github/workflows/ci.yml | 1 + newsfragments/3320.minor | 0 2 files changed, 1 insertion(+) create mode 100644 newsfragments/3320.minor diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ded8f418..7cd97dcca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,7 @@ jobs: matrix: os: - macos-latest + - windows-latest python-version: - 2.7 diff --git a/newsfragments/3320.minor b/newsfragments/3320.minor new file mode 100644 index 000000000..e69de29bb From 7d93ae9213aae1e4957bf580152a91ead586a511 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 22 Jun 2020 20:16:19 -0400 Subject: [PATCH 2/4] Skip Tor tests on Windows --- integration/conftest.py | 8 ++++++++ integration/test_tor.py | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/integration/conftest.py b/integration/conftest.py index 5395d7c5f..35e550416 100644 --- a/integration/conftest.py +++ b/integration/conftest.py @@ -359,6 +359,10 @@ def bob(reactor, temp_dir, introducer_furl, flog_gatherer, storage_nodes, reques @pytest.fixture(scope='session') def chutney(reactor, temp_dir): + + if sys.platform.startswith('win'): + pytest.skip('Tor tests are unstable on Windows') + chutney_dir = join(temp_dir, 'chutney') mkdir(chutney_dir) @@ -389,6 +393,10 @@ def chutney(reactor, temp_dir): @pytest.fixture(scope='session') def tor_network(reactor, temp_dir, chutney, request): + + if sys.platform.startswith('win'): + pytest.skip('Tor tests are unstable on Windows') + # this is the actual "chutney" script at the root of a chutney checkout chutney_dir = chutney chut = join(chutney_dir, 'chutney') diff --git a/integration/test_tor.py b/integration/test_tor.py index 633def8de..cec88a483 100644 --- a/integration/test_tor.py +++ b/integration/test_tor.py @@ -10,12 +10,17 @@ from six.moves import StringIO from twisted.internet.protocol import ProcessProtocol from twisted.internet.error import ProcessExitedAlready, ProcessDone from twisted.internet.defer import inlineCallbacks, Deferred + +import pytest import pytest_twisted import util # see "conftest.py" for the fixtures (e.g. "tor_network") +if sys.platform.startswith('win'): + pytest.skip('Skipping Tor tests on Windows', allow_module_level=True) + @pytest_twisted.inlineCallbacks def test_onion_service_storage(reactor, request, temp_dir, flog_gatherer, tor_network, tor_introducer_furl): yield _create_anonymous_node(reactor, 'carol', 8008, request, temp_dir, flog_gatherer, tor_network, tor_introducer_furl) From 9e82df4fa72d613fe2dc6ccd6b23bfb1102d561d Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Sun, 19 Jul 2020 09:19:19 -0400 Subject: [PATCH 3/4] Use skipif decorator to omit Tor integration test setup on Windows --- integration/conftest.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/integration/conftest.py b/integration/conftest.py index 35e550416..bb104b464 100644 --- a/integration/conftest.py +++ b/integration/conftest.py @@ -358,11 +358,10 @@ def bob(reactor, temp_dir, introducer_furl, flog_gatherer, storage_nodes, reques @pytest.fixture(scope='session') +@pytest.mark.skipif(sys.platform.startswith('win'), + 'Tor tests are unstable on Windows') def chutney(reactor, temp_dir): - if sys.platform.startswith('win'): - pytest.skip('Tor tests are unstable on Windows') - chutney_dir = join(temp_dir, 'chutney') mkdir(chutney_dir) @@ -392,11 +391,10 @@ def chutney(reactor, temp_dir): @pytest.fixture(scope='session') +@pytest.mark.skipif(sys.platform.startswith('win'), + reason='Tor tests are unstable on Windows') def tor_network(reactor, temp_dir, chutney, request): - if sys.platform.startswith('win'): - pytest.skip('Tor tests are unstable on Windows') - # this is the actual "chutney" script at the root of a chutney checkout chutney_dir = chutney chut = join(chutney_dir, 'chutney') From 7f5643a096c227f3457482fba9194a9565572721 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Tue, 21 Jul 2020 14:56:55 -0400 Subject: [PATCH 4/4] Add note on Tor integration test failures on Windows --- integration/test_tor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/integration/test_tor.py b/integration/test_tor.py index cec88a483..28360207a 100644 --- a/integration/test_tor.py +++ b/integration/test_tor.py @@ -18,6 +18,10 @@ import util # see "conftest.py" for the fixtures (e.g. "tor_network") +# XXX: Integration tests that involve Tor do not run reliably on +# Windows. They are skipped for now, in order to reduce CI noise. +# +# https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3347 if sys.platform.startswith('win'): pytest.skip('Skipping Tor tests on Windows', allow_module_level=True)