From 42c2c50da209e8d38d2e90c05a2c288ec6df7604 Mon Sep 17 00:00:00 2001 From: Kare Morstol Date: Thu, 31 Mar 2016 01:38:16 +0200 Subject: [PATCH] Make: use xcpretty if available. --- Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6c05b44..8ebe9bd 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,19 @@ +BUILDCLEANER := xcpretty +TESTCLEANER := xcpretty +ifeq (,$(shell command -v xcpretty)) + BUILDCLEANER := egrep '^(/.+:[0-9+:[0-9]+:.(error|warning):|fatal|===)' + TESTCLEANER := egrep -v '^Test Suite|^Test Case|^\t Executed' +endif .PHONY: build test clean -build: - @xcodebuild | egrep '^(/.+:[0-9+:[0-9]+:.(error|warning):|fatal|===)' - +build: + @xcodebuild | ${BUILDCLEANER} test: build - @xcodebuild test -scheme SwiftShell | egrep -v '^Test Suite|^Test Case|^\t Executed ' + @xcodebuild test -scheme SwiftShell | ${TESTCLEANER} + @echo @echo "=== RUN SwiftShell TEST SCRIPTS (SwiftShellTests/Scripts/runtests.bash) ===" @cd ./Tests/Scripts/ && ./runtests.bash @echo