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 test matrix #7219

Merged

Conversation

Serock3
Copy link
Contributor

@Serock3 Serock3 commented Nov 21, 2024


This change is Reviewable

Copy link

linear bot commented Nov 21, 2024

@Serock3 Serock3 force-pushed the test_upgrade_app-is-missing-from-the-test-result-matrix-des-1468 branch from 68f0eef to 73fbdd2 Compare November 21, 2024 14:01
@Serock3 Serock3 self-assigned this Nov 21, 2024
@Serock3 Serock3 marked this pull request as ready for review November 21, 2024 14:02
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.

Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Serock3)


test/test-manager/src/tests/mod.rs line 89 at r1 (raw file):

pub fn should_run_on_os(targets: &[Os], os: Os) -> bool {
    targets.is_empty() || targets.contains(&os)
}

Would it make sense to tie this to the TestDescription struct? There is a logical connection to a specific test whenever should_run_on_os is invoked I presume, but currently that connection is not expressed in this type signature 😊

Code quote:

pub fn should_run_on_os(targets: &[Os], os: Os) -> bool {
    targets.is_empty() || targets.contains(&os)
}

test/test-manager/src/tests/mod.rs line 105 at r1 (raw file):

        name: "test_upgrade_app",
        targets: &[],
    };

⛏️ Would it make sense to briefly explain why this test is added here, and this workaround could potentially be removed in the future? 😊

Code quote:

    let test_upgrade_app = TestDesciption {
        priority: None,
        name: "test_upgrade_app",
        targets: &[],
    };

Copy link
Contributor Author

@Serock3 Serock3 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 2 of 6 files reviewed, 1 unresolved discussion (waiting on @MarkusPettersson98)


test/test-manager/src/tests/mod.rs line 89 at r1 (raw file):

Previously, MarkusPettersson98 (Markus Pettersson) wrote…

Would it make sense to tie this to the TestDescription struct? There is a logical connection to a specific test whenever should_run_on_os is invoked I presume, but currently that connection is not expressed in this type signature 😊

Some context: I added TestDescription to avoid having to instantiateTestMetadata for test_upgrade_app (see the the first commit). It contained parameters that I didn't want to provide, like a function handle.

This function was tied to the TestMetadata before, but now it needs to be available to both it and TestDescription. I would need a trait, or to duplicate the method, to attach it to the types.


test/test-manager/src/tests/mod.rs line 105 at r1 (raw file):

Previously, MarkusPettersson98 (Markus Pettersson) wrote…

⛏️ Would it make sense to briefly explain why this test is added here, and this workaround could potentially be removed in the future? 😊

Sure, I added some documentation. Needing TestDescription in the first place is kind of a hack, but the proper solution needs a larger refactoring. I elaborated on that in a comment.

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.

Reviewed 4 of 4 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved


test/test-manager/src/tests/mod.rs line 89 at r1 (raw file):

Previously, Serock3 (Sebastian Holmin) wrote…

Some context: I added TestDescription to avoid having to instantiateTestMetadata for test_upgrade_app (see the the first commit). It contained parameters that I didn't want to provide, like a function handle.

This function was tied to the TestMetadata before, but now it needs to be available to both it and TestDescription. I would need a trait, or to duplicate the method, to attach it to the types.

Hmm, sad :( Oh well, it is what it is 😊

@Serock3 Serock3 force-pushed the test_upgrade_app-is-missing-from-the-test-result-matrix-des-1468 branch from 0e5c123 to 6afad81 Compare November 22, 2024 12:05
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 1 of 6 files at r3, 1 of 3 files at r4, 1 of 3 files at r5, 4 of 4 files at r6.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@Serock3 Serock3 merged commit 3a87217 into main Nov 22, 2024
39 checks passed
@Serock3 Serock3 deleted the test_upgrade_app-is-missing-from-the-test-result-matrix-des-1468 branch November 22, 2024 12:13
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