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

CPLAT-6557: Add release flag and config option to test task #308

Merged
merged 3 commits into from
Jul 22, 2019

Conversation

corwinsheahan-wf
Copy link
Contributor

Overview:

Sometimes, consumers want to run tests on dart2js compiled code in Dart 2. This technically can be done via an args separator, but this doesn't provide help info through the test task, and it also doesn't allow for a config option to be set.

This adds a top level flag to the test task, and a config option, for running tests in release mode.

Testing:

  • publink into any package consuming dart_dev
  • Verify that ddev test runs normally on Dart 1 and Dart 2.
  • Verify that ddev test -r and ddev test --release run a build via dart2js in Dart 2, and has no effect on Dart 1.
  • Verify that adding a test config option in dev.dart to release = true runs tests in release mode by default.
  • Verify that the command line flag takes precedent over the config option.

@aviary3-wk
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

@@ -57,6 +57,10 @@ class TestCli extends TaskCli {
negatable: false)
..addFlag('delete-conflicting-outputs',
help: 'Deletes conflicting outputs during the build', negatable: false)
..addFlag('release',
abbr: 'r',
negatable: true,

Choose a reason for hiding this comment

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

What does negatable mean?

Copy link
Member

Choose a reason for hiding this comment

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

that you can also do --no-release to turn the flag false

@todbachman-wf
Copy link
Member

QA +1

Testing Performed:

  • publink into wdesk_sdk
  • Verify that ddev test runs normally on Dart 1 and Dart 2.
  • Verify that ddev test -r and ddev test --release run a build via dart2js in Dart 2, and has no effect on Dart 1.
  • Verify that adding a test config option in dev.dart to release = true runs tests in release mode by default.
  • Verify that the command line flag takes precedent over the config option.

@todbachman-wf
Copy link
Member

@Workiva/release-management-pp

@rmconsole5-wk rmconsole5-wk merged commit 0c16746 into master Jul 22, 2019
@rmconsole5-wk rmconsole5-wk deleted the add_release_flag_to_test_task branch July 22, 2019 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants