From 44f865dc4ff82a064a952d9ddd69c8bd9bfaee8a Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sun, 18 Jan 2026 11:19:52 -0500 Subject: [PATCH] Fix library sourcing and fix junit formatting for github test reporters --- bin/shunit.sh | 5 +++-- lib/junit.sh | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/shunit.sh b/bin/shunit.sh index b8ffa1a..8751720 100644 --- a/bin/shunit.sh +++ b/bin/shunit.sh @@ -1,7 +1,8 @@ #!/bin/bash -libdir=$(readlink -f $(dirname ${BASH_SOURCE[0]}))/../lib -source ${libdir}/cmdarg.sh +libdir=$(readlink -f $(dirname ${BASH_SOURCE[0]}))/../lib +cmdarg_libdir=${AK_PREFIX/lib:-${libdir}} +source ${cmdarg_libdir}/cmdarg.sh function validate_format { diff --git a/lib/junit.sh b/lib/junit.sh index 65ad855..9e69f2e 100644 --- a/lib/junit.sh +++ b/lib/junit.sh @@ -54,7 +54,8 @@ EOF fi echo '' - echo '' + echo '' + echo '' echo ' ' } @@ -73,6 +74,7 @@ EOF cat /tmp/$$.junit rm -f /tmp/$$.junit echo '' + echo '' return 0 } @@ -107,6 +109,8 @@ EOF if [ "$failtype" != "" ]; then SHUNIT_ERRORS=$(expr $SHUNIT_ERRORS + 1) SHUNIT_FAILURES=$(expr $SHUNIT_FAILURES + 1) + echo ' ' >> /tmp/$$.junit + echo ' ' >> /tmp/$$.junit echo ' ' >> /tmp/$$.junit echo ' > /tmp/$$.junit echo "${cdata}" >> /tmp/$$.junit