Sitelet https://web.archive.org/web/20210720162651/https://github.com/flutter/flutter/pull/86701
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

Add a "variant: " prefix to variant descriptions in test names #86701

Merged
merged 1 commit into from Jul 20, 2021

Conversation

@DanTup
Copy link
Contributor

@DanTup DanTup commented Jul 20, 2021

This tweaks the suffix added to test names when using variants to be slightly more specific ( (variant: foo) instead of just (foo):

Screenshot 2021-07-20 at 09 54 00

This is to help editors that have access only to the test name that want to support running tests easily from the editor, but without leaving the regex passed to flutter test --name open-ended, which might match other tests than the one the user expected to run (if they have their own suffix in parens).

Right now, VS Code uses a regex like:

flutter test --name "^Counter increments smoke test$" test/widget_test.dart

But this fails for tests with variants. The goal is to change this regex to something like:

flutter test --name "^Counter increments smoke test( \(variant: .*\))?$" test/widget_test.dart

This will still avoid matching other tests with a suffix in parens, but allow the variants to run, fixing #86659.

IntelliJ doesn't currently use the same restrictive regex, but that leads to behaviour that could be considered a bug and is likely to be updated with flutter/flutter-intellij#5650.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@gspencergoog @jonahwilliams I'm assuming nobody outside of this repo is relying on the exact format of this suffix, but if you think that might not be correct, please let me know!

@skia-gold
Copy link

@skia-gold skia-gold commented Jul 20, 2021

Gold has detected about 2 new digest(s) on patchset 1.
View them at https://flutter-gold.skia.org/cl/github/86701

@DanTup
Copy link
Contributor Author

@DanTup DanTup commented Jul 20, 2021

I'm not sure how to interpret the skia-gold comment/results above - is it indicative of an error? (I see it's on a few other recent PRs though, so might not be related to my change).

@flutter-dashboard
Copy link

@flutter-dashboard flutter-dashboard bot commented Jul 20, 2021

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #86701 at sha bd2dd2b

Copy link
Contributor

@gspencergoog gspencergoog left a comment

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@gspencergoog
Copy link
Contributor

@gspencergoog gspencergoog commented Jul 20, 2021

I'm not sure what to make of the golden file changes either. Clearly your PR should not be changing golden file results, so I am inclined to ignore them.

@Piinks
Copy link
Contributor

@Piinks Piinks commented Jul 20, 2021

This should be safe to merge, it looks like the flutter-gold check has resolved now. There were unchecked images that were merged in accidentally. Confirmed the reported images here are ok.

@fluttergithubbot fluttergithubbot merged commit 91b67e8 into flutter:master Jul 20, 2021
53 checks passed
53 checks passed
@flutter-dashboard
Linux analyze
Details
@flutter-dashboard
Linux build_tests_1_2
Details
@flutter-dashboard
Linux build_tests_2_2
Details
@flutter-dashboard
Linux customer_testing
Details
@flutter-dashboard
Linux docs
Details
@flutter-dashboard
Linux firebase_abstract_method_smoke_test
Details
@flutter-dashboard
Linux firebase_android_embedding_v2_smoke_test
Details
@flutter-dashboard
Linux firebase_release_smoke_test
Details
@flutter-dashboard
Linux flutter_plugins
Details
@flutter-dashboard
Linux framework_tests_libraries
Details
@flutter-dashboard
Linux framework_tests_misc
Details
@flutter-dashboard
Linux framework_tests_widgets
Details
@flutter-dashboard
Linux fuchsia_precache
Details
@flutter-dashboard
Linux web_long_running_tests_1_5
Details
@flutter-dashboard
Linux web_long_running_tests_2_5
Details
@flutter-dashboard
Linux web_long_running_tests_3_5
Details
@flutter-dashboard
Linux web_long_running_tests_4_5
Details
@flutter-dashboard
Linux web_long_running_tests_5_5
Details
@flutter-dashboard
Linux web_tests_0
Details
@flutter-dashboard
Linux web_tests_1
Details
@flutter-dashboard
Linux web_tests_2
Details
@flutter-dashboard
Linux web_tests_3
Details
@flutter-dashboard
Linux web_tests_4
Details
@flutter-dashboard
Linux web_tests_5
Details
@flutter-dashboard
Linux web_tests_6
Details
@flutter-dashboard
Linux web_tests_7_last
Details
@flutter-dashboard
Mac build_tests_1_4
Details
@flutter-dashboard
Mac build_tests_2_4
Details
@flutter-dashboard
Mac build_tests_3_4
Details
@flutter-dashboard
Mac build_tests_4_4
Details
@flutter-dashboard
Mac customer_testing
Details
@flutter-dashboard
Mac framework_tests_libraries
Details
@flutter-dashboard
Mac framework_tests_misc
Details
@flutter-dashboard
Mac framework_tests_widgets
Details
@wip
WIP Ready for review
Details
@flutter-dashboard
Windows build_tests_1_3
Details
@flutter-dashboard
Windows build_tests_2_3
Details
@flutter-dashboard
Windows build_tests_3_3
Details
@flutter-dashboard
Windows customer_testing
Details
@flutter-dashboard
Windows framework_tests_libraries
Details
@flutter-dashboard
Windows framework_tests_misc
Details
@flutter-dashboard
Windows framework_tests_widgets
Details
@cirrus-ci
analyze-linux Task Summary
Details
@flutter-dashboard
ci.yaml validation .ci.yaml validation
Details
@google-cla
cla/google All necessary CLAs are signed
@cirrus-ci
customer_testing-linux Task Summary
Details
@cirrus-ci
docs-linux Task Summary
Details
@flutter-dashboard
flutter-gold All golden file tests have passed.
Details
@cirrus-ci
framework_tests-libraries-linux Task Summary
Details
@cirrus-ci
framework_tests-misc-linux Task Summary
Details
@cirrus-ci
framework_tests-widgets-linux Task Summary
Details
@flutter-dashboard
luci-flutter
Details
@cirrus-ci
web_smoke_test Task Summary
Details
@DanTup
Copy link
Contributor Author

@DanTup DanTup commented Jul 20, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants