[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`.
This commit is contained in:
Daniel Dunbar
2016-06-01 17:17:51 -07:00
parent ceefc13db4
commit 01a1559895
2 changed files with 13 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ class TarTestCase(unittest.TestCase):
expect.format(dest=destination, source=source))
def test_tar_nonexistent_file_raises(self):
with self.assertRaises(subprocess.CalledProcessError):
with self.assertRaises(SystemExit):
tar(source='/path/to/something/that/surely/doesnt/exist',
destination='/another/path/that/shouldnt/exist')