Skip to content

Commit 0e208c3

Browse files
committed
. t Added some failure logic.
1 parent cefe8e7 commit 0e208c3

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

scripts/run_unittests.sh

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,25 @@ red=$(tput setaf 1)
1010
reset=$(tput sgr0)
1111
bold=$(tput bold)
1212

13+
fail() {
14+
echo "${bold}${red}FAIL${reset}"
15+
exit 1
16+
}
17+
1318
set -euo pipefail
1419

1520
HERE=$(cygpath -w $(pwd))
1621

17-
g-cli vipc -- -v "${LV_VERSION:-"20.0 (64-bit)"}" -t 1200 "approvals-dev.vipc"
18-
g-cli lunit -- -r "reports\\LUnit.UnitTestReport.xml" "Approval Testing.lvproj"
19-
g-cli vitester -- -r "reports\\VITester.UnitTestReport.xml" "Tests\\Extension Tests.lvproj"
22+
g-cli vipc -- -v "${LV_VERSION:-"20.0 (64-bit)"}" -t 1200 "approvals-dev.vipc" || fail
23+
g-cli lunit -- -r "reports\\LUnit.UnitTestReport.xml" "Approval Testing.lvproj" || fail
24+
g-cli vitester -- -r "reports\\VITester.UnitTestReport.xml" "Tests\\Extension Tests.lvproj" || fail
2025
SECONDS=0
2126
echo "Running Caraya Extension Tests" # needed because caray tool is not very verbose.
22-
g-cli caraya -- -s "Tests\\Caraya.Tests\\Caraya Extension Tests\\Caraya Extension Tests.lvclass" -x "reports\\Caraya.UnitTestReport.xml"
27+
g-cli caraya -- -s "Tests\\Caraya.Tests\\Caraya Extension Tests\\Caraya Extension Tests.lvclass" -x "reports\\Caraya.UnitTestReport.xml" || fail
2328
echo "Test Time: $SECONDS"
2429
SECONDS=0
2530
echo "Running Error Propagation Tests"
26-
g-cli caraya -- -s "Tests\\Error.Propagation.Tests\\Error.Propagation.Tests.lvclass" -x "reports\\Error.Propagation.UnitTestReport.xml"
27-
28-
echo "${bold}${green}Result Pass${reset}"
29-
echo "${bold}Test Time: $SECONDS${reset}"
31+
g-cli caraya -- -s "Tests\\Error.Propagation.Tests\\Error.Propagation.Tests.lvclass" -x "reports\\Error.Propagation.UnitTestReport.xml" || fail
32+
echo "Test Time: $SECONDS"
33+
echo "${bold}${green}PASS${reset}"
3034

0 commit comments

Comments
 (0)