2016-01-22 14:29:30 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2016-02-19 14:58:10 -08:00
|
|
|
test -x bin/powershell || { echo >&2 "No bin/powershell, please run './build.sh'"; exit 1; }
|
|
|
|
|
|
2016-03-04 15:46:54 -08:00
|
|
|
./bin/powershell --noprofile -c "Import-Module Microsoft.PowerShell.Platform; Invoke-Pester test/powershell/$1 -OutputFile pester-tests.xml -OutputFormat NUnitXml -EnableExit"
|
2016-01-22 14:29:30 -08:00
|
|
|
failed_tests=$?
|
|
|
|
|
|
2015-12-23 13:12:40 -08:00
|
|
|
# XML files are not executable
|
|
|
|
|
chmod -x pester-tests.xml
|
2016-01-22 14:29:30 -08:00
|
|
|
|
2016-02-03 14:13:38 -08:00
|
|
|
# Return number of failed tests as exit code (more than 0 will be an error)
|
|
|
|
|
exit $failed_tests
|