mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-24 02:04:07 +08:00
41a236dc5b
- Check if PowerShell has been built before trying to use it.
13 lines
416 B
Bash
Executable File
13 lines
416 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
test -x bin/powershell || { echo >&2 "No bin/powershell, please run './build.sh'"; exit 1; }
|
|
|
|
./bin/powershell --noprofile -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
|
|
|
|
# Return number of failed tests as exit code (more than 0 will be an error)
|
|
exit $failed_tests
|