Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Flexible and fast xcodebuild formatter

License

NotificationsYou must be signed in to change notification settings

xcpretty/xcpretty

Repository files navigation

logo

xcpretty is a fast and flexible formatter forxcodebuild.
It does one thing, and it should do it well.

Gem versionBuild StatusCode ClimateReviewed by Hound

Installation

$ gem install xcpretty

Usage

$ xcodebuild [flags]| xcpretty

xcpretty is designed to be piped withxcodebuild and thus keeping 100%compatibility with it. It's even a bit faster thanxcodebuild itself, sinceit saves your terminal some prints.

Important: If you're runningxcpretty on a CI like Travis or Jenkins, youmay want to exit with same status code asxcodebuild.CI systems usually use status codes to determine if the build has failed.

$set -o pipefail&& xcodebuild [flags]| xcpretty## OR#$ xcodebuild [flags]| xcpretty&&exit${PIPESTATUS[0]}

Raw xcodebuild output

You might want to usexcpretty together withtee to store the raw log in afile, and get the pretty output in the terminal. This might be useful if youwant to inspect a failure in detail and aren't able to tell from the prettyoutput.

Here's a way of doing it:

$ xcodebuild [flags]| tee xcodebuild.log| xcpretty

Formats

ANSI / UTF-8

  • --[no-]color: Show build icons in color. (you can add it to--simple or--test format).Defaults to auto-detecting color availability.
  • --[no-]utf: Use unicode characters in build output or only ASCII.Defaults to auto-detecting the current locale.

Reporters

  • --report junit,-r junit: Creates a JUnit-style XML report atbuild/reports/junit.xml, compatible with Jenkins and TeamCity CI.

  • --report html,-r html: Creates a simple HTML report atbuild/reports/tests.html.xcpretty html

  • --report json-compilation-database,-r json-compilation-database: Creates aJSON compilation database atbuild/reports/compilation_db.json. This is a format to replay single compilations independently of the build system.

Writing a report to a custom path can be specified using--output PATH.

Extensions

xcpretty supports custom formatters through the use of the--formatter flag, which takes a path to a file as an argument. Thefile must contain a Ruby subclass ofXCPretty::Formatter, andreturn that class at the end of the file. The classcan override theformat_* methods to hook into output parsingevents.

Known extensions

The recommended format is a gem containing the formatter and namedwith anxcpretty- prefix, for easier discovery.

Team


[8]ページ先頭

©2009-2025 Movatter.jp