Skip to content

Commit

Permalink
Fix bug when pruning test elements
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdicarlo committed Jul 19, 2021
1 parent 612b54c commit 4795d39
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `phpunit-failed-runner` will be documented in this file

## 1.1.1 - 2021-07-18

- Fix bug in bash script when pruning test elements

## 1.1.0 - 2021-07-18

- Removes log file once all tests have passed
Expand Down
6 changes: 4 additions & 2 deletions phpunit-failed-runner
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ if test -f "$logfile"; then
./vendor/bin/phpunit --filter "'$failed_tests'"

# Strip out everything except the failed tests
xmlstarlet tr ./vendor/chrisdicarlo/phpunit-failed-runner/prune.xsl testdox.xml > testdox.xml
xmlstarlet tr ./vendor/chrisdicarlo/phpunit-failed-runner/prune.xsl testdox.xml > testdoxTMP.xml
mv testdoxTMP.xml testdox.xml
fi

# If there are no more failed tests, remove the log file
Expand All @@ -29,7 +30,8 @@ else
./vendor/bin/phpunit

# Strip out everything except the failed tests
xmlstarlet tr ./vendor/chrisdicarlo/phpunit-failed-runner/prune.xsl testdox.xml > testdox.xml
xmlstarlet tr ./vendor/chrisdicarlo/phpunit-failed-runner/prune.xsl testdox.xml > testdoxTMP.xml
mv testdoxTMP.xml testdox.xml
fi

exit 0

0 comments on commit 4795d39

Please sign in to comment.