Skip to content

[utils] Improve swift_build_support.shell failure messages. #2831

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

Merged
merged 1 commit into from
Jun 2, 2016

Conversation

ddunbar
Copy link
Contributor

@ddunbar ddunbar commented Jun 2, 2016

What's in this pull request?

[utils] Improve swift_build_support.shell failure messages.

 - This improves the error messages when commands fail (or don't exist) to show
   a one-line summary of the issue instead of the Python backtrace, and matches
   what was being done by the matching function in `SwiftBuildSupport`.

Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
All supported platforms @swift-ci Please smoke test and merge
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
All supported platforms @swift-ci Please test and merge
OS X platform @swift-ci Please test OS X platform
OS X platform @swift-ci Please benchmark
Linux platform @swift-ci Please test Linux platform

Lint Testing

Language Comment
Python @swift-ci Please Python lint

Note: Only members of the Apple organization can trigger swift-ci.

@ddunbar
Copy link
Contributor Author

ddunbar commented Jun 2, 2016

(this depends on #2830, I will rebase once merged)

@ddunbar
Copy link
Contributor Author

ddunbar commented Jun 2, 2016

/cc @gribozavr

@swift-ci please Python lint

@gribozavr
Copy link
Contributor

@swift-ci Please smoke test

@gribozavr
Copy link
Contributor

OS X smoke test issue was unrelated, I removed the build directory.

@swift-ci Please smoke test OS X platform

@gribozavr
Copy link
Contributor

@ddunbar

FAIL: Swift :: Python/swift_build_support.swift (2295 of 8267)
******************** TEST 'Swift :: Python/swift_build_support.swift' FAILED ********************
Script:
--
/usr/bin/python -m unittest discover -s /home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/swift/validation-test/Python/../../utils/swift_build_support
--
Exit Code: 1

Command Output (stderr):
--
ss....s.................................E................
======================================================================
ERROR: test_tar_nonexistent_file_raises (tests.test_tar.TarTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/swift/utils/swift_build_support/tests/test_tar.py", line 56, in test_tar_nonexistent_file_raises
    destination='/another/path/that/shouldnt/exist')
  File "/home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/swift/utils/swift_build_support/swift_build_support/tar.py", line 35, in tar
    shell.call(args + [source], stderr=subprocess.PIPE)
  File "/home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/swift/utils/swift_build_support/swift_build_support/shell.py", line 76, in call
    str(e.returncode) + ", aborting")
  File "/home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/swift/utils/swift_build_support/swift_build_support/diagnostics.py", line 32, in fatal
    raise SystemExit(sys.argv[0] + ": fatal error: " + message)
SystemExit: python -m unittest: fatal error: command terminated with a non-zero exit status 2, aborting

----------------------------------------------------------------------
Ran 57 tests in 8.371s

FAILED (errors=1, skipped=3)

--

@ddunbar
Copy link
Contributor Author

ddunbar commented Jun 2, 2016

Oops, didn't realize we had coverage of this. Will fix!

 - This improves the error messages when commands fail (or don't exist) to show
   a one-line summary of the issue instead of the Python backtrace, and matches
   what was being done by the matching function in `SwiftBuildSupport`.
@ddunbar ddunbar force-pushed the improve-shell-diagnostics branch from 09c0329 to 01a1559 Compare June 2, 2016 03:03
@ddunbar
Copy link
Contributor Author

ddunbar commented Jun 2, 2016

@swift-ci Please smoke test

@gribozavr gribozavr merged commit eaa3201 into swiftlang:master Jun 2, 2016
@ddunbar ddunbar deleted the improve-shell-diagnostics branch June 6, 2016 16:43
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