From cd81479b8724c4074f1441365a243f26eaabaefd Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 22 Jan 2016 14:29:30 -0800 Subject: [PATCH] Add test failure threshold to pester.sh Set to 14 because of non-tty and random process failures. --- pester.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pester.sh b/pester.sh index 032958d2cf..2cce72081f 100755 --- a/pester.sh +++ b/pester.sh @@ -1,3 +1,10 @@ -./bin/powershell -c "Invoke-Pester test/powershell/$1 -OutputFile pester-tests.xml -OutputFormat NUnitXml" +#!/usr/bin/env bash + +./bin/powershell -c "Invoke-Pester test/powershell/$1 -OutputFile pester-tests.xml -OutputFormat NUnitXml -EnableExit" +failed_tests=$? + # XML files are not executable chmod -x pester-tests.xml + +# Exit with failure if number of failed tests exceeds threshold +[ ! $failed_tests -gt 14 ]