[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master de32b80 7/8: Add an all-platform unit-test sc
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master de32b80 7/8: Add an all-platform unit-test script |
Date: |
Fri, 30 Jul 2021 16:14:48 -0400 (EDT) |
branch: master
commit de32b809ad923e18037fb65b41680dd4e97d541b
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Add an all-platform unit-test script
Added a script much like 'speed_test.sh', which runs a set of tests
(unit rather than speed tests) across all supported platforms.
---
gwc/unit_test.sh | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gwc/unit_test.sh b/gwc/unit_test.sh
new file mode 100755
index 0000000..b87176a
--- /dev/null
+++ b/gwc/unit_test.sh
@@ -0,0 +1,26 @@
+#!/bin/zsh
+
+# 'triplets' really is used, but in a zsh-specific way
+# shellcheck disable=SC2034
+ triplets="x86_64-pc-linux-gnu x86_64-w64-mingw32 i686-w64-mingw32"
+export LMI_COMPILER=gcc
+export LMI_TRIPLET
+# shellcheck disable=SC2043
+for LMI_TRIPLET in ${=triplets} ;
+do
+prefix=/opt/lmi
+exec_prefix="$prefix/${LMI_COMPILER}_${LMI_TRIPLET}"
+log_dir="$exec_prefix"/logs
+{
+printf 'LMI_TRIPLET = "%s"\n' "$LMI_TRIPLET" > /dev/tty
+# shellcheck disable=SC2154
+# shellcheck disable=SC2039
+ make "$coefficiency" --output-sync=recurse unit_tests 2>&1 \
+ | tee \
+ >(grep '\*\*\*') \
+ >(grep \?\?\?\?) \
+ >(grep '!!!!' --count | xargs printf '%d tests succeeded\n') \
+ >"$log_dir"/unit_tests
+}
+printf "\n Done.\n"
+done
- [lmi-commits] [lmi] master updated (028b454 -> 5d4f506), Greg Chicares, 2021/07/30
- [lmi-commits] [lmi] master 828ff21 1/8: Renumber some unit tests, Greg Chicares, 2021/07/30
- [lmi-commits] [lmi] master 0113a5d 3/8: Test three examples from a textbook, Greg Chicares, 2021/07/30
- [lmi-commits] [lmi] master 4bc5b1f 4/8: Make bounds and tolerance match textbook examples better, Greg Chicares, 2021/07/30
- [lmi-commits] [lmi] master b954393 2/8: Don't hard-code sqrt(2), Greg Chicares, 2021/07/30
- [lmi-commits] [lmi] master de32b80 7/8: Add an all-platform unit-test script,
Greg Chicares <=
- [lmi-commits] [lmi] master 5d4f506 8/8: Record speed measurements, Greg Chicares, 2021/07/30
- [lmi-commits] [lmi] master cf516cc 6/8: Remove code added in the last commit to support its conclusions, Greg Chicares, 2021/07/30
- [lmi-commits] [lmi] master ac5731f 5/8: Controvert a published claim, Greg Chicares, 2021/07/30