Delete pipeline artifacts of only passed jobs, not jobs that timed out
-
This fixes an issue introduced in a recent prior commit (SHA c2f03ae0) where any bats subtest that is not a failure was considered to be a pass. But it could be a timeout scenario too. This meant even timed out subtests got their bats output directories removed which made investigating pipeline timeouts difficult with no artifacts. This is now fixed by also determining which tests are timed out and only classifying the remaining tests as passed subtests. And we only delete those passed subtest output directories.
-
While fixing this, it was noticed that there were multiple bats subtests in different tests matching the same subtest string (i.e.
order by firstName ascending
matched a subtest in thetest_order_by
bats test as well as theTIJOB07
,TIJOB08
,TOBW01
andTOBW02
bats subtests. This is fixed by adding a unique subtest idTOB0A
etc. to subtests in thetest_order_by
bats test that way whentools/ci/build.sh
tries to figure out the name of a subtest, it gets a much more unique string to search for and avoids duplicate matches.