Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing macOS DNS tests, and truncate log files in tests #5346

Merged
merged 6 commits into from
Oct 24, 2023

Conversation

dlon
Copy link
Member

@dlon dlon commented Oct 23, 2023

Changes:

  • Fetch tags when checking out code in GH Actions (so that ci-runtests.sh can recognize tags).
  • Make sure tests don't leave any lingering tokio tasks that were spawned.
  • Cache UI runners.
  • Truncate log files before transferring them and ignore .old.log files.
  • Fix failing DNS leak tests on macOS

This change is Reviewable

@dlon dlon force-pushed the test-cleanup-probes branch from f6d96c8 to 48531c5 Compare October 23, 2023 15:48
Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 4 of 6 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @dlon)


.github/workflows/desktop-e2e.yml line 6 at r2 (raw file):

    - cron: '0 0 * * *'
  workflow_dispatch:
  push:

Remove before merge

Code quote:

push:

test/ci-runtests.sh line 36 at r2 (raw file):

#NEW_APP_VERSION=$(cargo run -q --manifest-path="$APP_DIR/Cargo.toml" --bin mullvad-version)
#commit=$(git rev-parse HEAD^\{commit\})
#commit=${commit:0:6}

Revert before merge

Code quote:

NEW_APP_VERSION=2023.5-dev-03feae
commit=03feae
#NEW_APP_VERSION=$(cargo run -q --manifest-path="$APP_DIR/Cargo.toml" --bin mullvad-version)
#commit=$(git rev-parse HEAD^\{commit\})
#commit=${commit:0:6}

test/test-runner/src/logging.rs line 22 at r2 (raw file):

const EXCLUDE_LOG_FILE_CONTAIN: &str = ".old";
/// Maximum number of lines that each log file may contain
const TRUNCATE_LOG_FILE_LINES: usize = 100;

This could be more general/configurable, but good enough for now:D

Code quote:

/// Only consider files that end with ".log"
const INCLUDE_LOG_FILE_EXT: &str = "log";
/// Ignore log files that contain ".old"
const EXCLUDE_LOG_FILE_CONTAIN: &str = ".old";
/// Maximum number of lines that each log file may contain
const TRUNCATE_LOG_FILE_LINES: usize = 100;

@dlon dlon force-pushed the test-cleanup-probes branch from 855e903 to 3aabe48 Compare October 24, 2023 07:45
@dlon dlon changed the title Truncate log files in tests Fix failing macOS DNS tests, and truncate log files in tests Oct 24, 2023
@dlon dlon marked this pull request as ready for review October 24, 2023 07:46
Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @dlon)

@dlon dlon merged commit f6a6bfa into main Oct 24, 2023
26 checks passed
@dlon dlon deleted the test-cleanup-probes branch October 24, 2023 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants