Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@dkwingsmt
Copy link
Contributor

@dkwingsmt dkwingsmt commented Jan 8, 2021

Description

This PR prints the CalledProcessError.output before the error is thrown and crashes the app. This happens when the test fails to compile. Without it, you only get the following message and will never know where to fix without running the command locally.

Command run successfully in 0.24 seconds: /opt/s/w/ir/cache/builder/src/out/host_debug_unopt/flutter_tester --disable-observatory --use-test-fonts /opt/s/w/ir/cache/builder/src/out/paragraph_test.dart.kernel.dill
Testing dart file /opt/s/w/ir/cache/builder/src/flutter/testing/dart/window_hooks_integration_test.dart
Generating snapshot for test /opt/s/w/ir/cache/builder/src/flutter/testing/dart/window_hooks_integration_test.dart
Traceback (most recent call last):
  File "/opt/s/w/ir/cache/builder/src/flutter/testing/run_tests.py", line 510, in <module>
    sys.exit(main())
  File "/opt/s/w/ir/cache/builder/src/flutter/testing/run_tests.py", line 485, in main
    RunDartTests(build_dir, dart_filter, args.verbose_dart_snapshot)
  File "/opt/s/w/ir/cache/builder/src/flutter/testing/run_tests.py", line 418, in RunDartTests
    RunDartTest(build_dir, dart_test_file, verbose_dart_snapshot, True)
  File "/opt/s/w/ir/cache/builder/src/flutter/testing/run_tests.py", line 225, in RunDartTest
    SnapshotTest(build_dir, dart_file, kernel_file_output, verbose_dart_snapshot)
  File "/opt/s/w/ir/cache/builder/src/flutter/testing/run_tests.py", line 217, in SnapshotTest
    subprocess.check_output(snapshot_command, cwd=buildroot_dir)
  File "/opt/s/w/ir/cipd_bin_packages/cpython/lib/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/opt/s/w/ir/cache/builder/src/out/host_debug_unopt/dart-sdk/bin/dart', '/opt/s/w/ir/cache/builder/src/out/host_debug_unopt/gen/frontend_server.dart.snapshot', '--enable-experiment=non-nullable', '--no-sound-null-safety', '--sdk-root', '/opt/s/w/ir/cache/builder/src/out/host_debug_unopt/flutter_patched_sdk', '--incremental', '--target=flutter', '--packages', '/opt/s/w/ir/cache/builder/src/flutter/testing/dart/.packages', '--output-dill', '/opt/s/w/ir/cache/builder/src/out/window_hooks_integration_test.dart.kernel.dill', '/opt/s/w/ir/cache/builder/src/flutter/testing/dart/window_hooks_integration_test.dart']' returned non-zero exit status 254

(See https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket.appspot.com/8858721042103931248/+/steps/Host_Tests_for_host_debug_unopt/0/stdout?format=raw)

Related Issues

Replace this paragraph with a list of issues related to this PR from our issue
database
. Indicate, which of these issues are resolved or fixed by this PR.
There should be at least one issue listed here.

Tests

I added the following tests:

Replace this with a list of the tests that you added as part of this PR. A
change in behaviour with no test covering it will likely get reverted
accidentally sooner or later. PRs must include tests for all
changed/updated/fixed behaviors. See testing the engine for instructions on
writing and running engine tests.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the contributor guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the C++, Objective-C, Java style guides for the engine.
  • I read the tree hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation.
  • All existing and new tests are passing.
  • I am willing to follow-up on review comments in a timely manner.

Reviewer Checklist

Breaking Change

Did any tests fail when you ran them? Please read handling breaking changes.

@chinmaygarde chinmaygarde added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Jan 14, 2021
@chinmaygarde
Copy link
Member

I think the presubmit failure is a known flake that has been fixed. I have re-run it but I can't recall if it required a rebase as well. If the CQ fails after the test run still, please rebase and land. Thanks.

@fluttergithubbot
Copy link
Contributor

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

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

@fluttergithubbot fluttergithubbot removed the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Jan 14, 2021
@dkwingsmt dkwingsmt merged commit 8a096d6 into flutter:master Jan 20, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 20, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 20, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 20, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 20, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 20, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 20, 2021
zanderso pushed a commit to flutter/flutter that referenced this pull request Jan 20, 2021
* d4a7358 Roll Dart SDK from c4214e6daaac to 4a6764bf28c2 (4 revisions) (flutter/engine#23770)

* 9bc776a [web] Add --watch flag to 'felt test' (flutter/engine#23727)

* 247ebc2 Roll Skia from bde06cc511d2 to f3087d8297fe (7 revisions) (flutter/engine#23772)

* 8b27e6f skip flaky test (flutter/engine#23775)

* 2927e9f block thread merging with shared engines (flutter/engine#23733)

* df5f3b0 Implement handling of framework-handled key events (flutter/engine#23655)

* f205ced Roll Skia from f3087d8297fe to e0fe62adaa3e (9 revisions) (flutter/engine#23781)

* fa7aebf Roll Skia from e0fe62adaa3e to 18aeb5731b51 (1 revision) (flutter/engine#23784)

* 9acfb7d Fix JNI void vs object method call (flutter/engine#23785)

* df13ccf Roll Skia from 18aeb5731b51 to 7aa7f039b9ee (1 revision) (flutter/engine#23786)

* e3e3b2b Roll Fuchsia Mac SDK from pc_veLlry... to xYraItnQp... (flutter/engine#23787)

* 8a096d6 ci: Print output in case of compile error (flutter/engine#23522)

* f1c3ced Roll Fuchsia Linux SDK from fByXAJ76e... to vs54lOVoj... (flutter/engine#23788)

* 0c79393 Revert "Roll Dart SDK from c4214e6daaac to 4a6764bf28c2 (4 revisions) (#23770)" (flutter/engine#23791)
hjfreyer pushed a commit to hjfreyer/engine that referenced this pull request Mar 22, 2021
* Print compile error

* Better comment

* Update run_tests.py
@dkwingsmt dkwingsmt deleted the print-compile-error branch January 6, 2022 01:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants