Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented May 12, 2021

Don't make the user set LANG themselves as instructed in https://github.com/flutter/flutter/wiki/Running-and-writing-tests#running-device-lab-tests-locally.
Add test. Remove bot_test that's been skipped since #43149 since BOT env is tested in the new test.

Validated LANG=ru_RU.KOI8-R dart bin/run.dart -t hot_mode_dev_cycle_macos_target__benchmark failed before this PR and passed after.

Fixes #54475

@jmagman jmagman added the c: contributor-productivity Team-specific productivity, code health, technical debt. label May 12, 2021
@jmagman jmagman self-assigned this May 12, 2021
@google-cla google-cla bot added the cla: yes label May 12, 2021
final Map<String, String> newEnvironment = Map<String, String>.from(environment ?? <String, String>{});
newEnvironment['BOT'] = isBot ? 'true' : 'false';
newEnvironment['LANG'] = 'en_US.UTF-8';
print('\nExecuting: $command in $finalWorkingDirectory with environment $newEnvironment');
Copy link
Member Author

Choose a reason for hiding this comment

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

Print the entire env, including BOT and LANG. This makes it testable, and is probably just a good idea for accuracy.

void main() {
test('BOT variable is set on bots', () {
expect(Platform.environment['BOT'], 'true');
}, skip: true);
Copy link
Member Author

Choose a reason for hiding this comment

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

This has been skipped for awhile #43149.

@jmagman jmagman requested a review from CaseyHillers May 12, 2021 16:30
Copy link
Contributor

@CaseyHillers CaseyHillers left a comment

Choose a reason for hiding this comment

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

LGTM

@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@fluttergithubbot fluttergithubbot merged commit 1ff5665 into flutter:master May 12, 2021
@jmagman jmagman deleted the lang branch May 12, 2021 17:54
@jmagman jmagman added the a: tests "flutter test", flutter_test, or one of our tests label Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: tests "flutter test", flutter_test, or one of our tests c: contributor-productivity Team-specific productivity, code health, technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Force local runs of devicelab tests to use en_US locale

3 participants