[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master c252bc5 2/2: Nychthemerally test pc-linux-gnu
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master c252bc5 2/2: Nychthemerally test pc-linux-gnu as well as *-w64-mingw* |
Date: |
Sun, 25 Oct 2020 18:27:47 -0400 (EDT) |
branch: master
commit c252bc5f2d3929d6fd94e27f9fb42e1b9a42f5da
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Nychthemerally test pc-linux-gnu as well as *-w64-mingw*
---
nychthemeral_test.sh | 31 +++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)
diff --git a/nychthemeral_test.sh b/nychthemeral_test.sh
index e6fa41e..d25d1c4 100755
--- a/nychthemeral_test.sh
+++ b/nychthemeral_test.sh
@@ -40,11 +40,6 @@ setopt PIPE_FAIL
srcdir=$(dirname "$(readlink --canonicalize "$0")")
-# Cannot recursively check script on path determined at runtime, so
-# a directive like 'source="$srcdir"' doesn't work.
-# shellcheck disable=SC1090
-. "$srcdir"/set_toolchain.sh
-
coefficiency=${coefficiency:-"--jobs=$(nproc)"}
build_clutter='
@@ -136,12 +131,31 @@ nychthemeral_clutter='
/^$/d
'
+lmi_build_type=$(/usr/share/misc/config.guess)
+
+case "$lmi_build_type" in
+ (*-*-cygwin*)
+ platform=Cygwin
+ ;;
+esac
+
# This for-loop can iterate over as many toolchains as desired.
# Make sure the current production architecture is built last, so that
# it's the one installed to /opt/lmi/bin/ when this script ends.
+triplets="x86_64-w64-mingw32 i686-w64-mingw32"
+if [ "Cygwin" != "$platform" ] && [ "WSL" != "$platform" ]
+then
+# '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"
+fi
export LMI_COMPILER=gcc
export LMI_TRIPLET
-for LMI_TRIPLET in x86_64-w64-mingw32 i686-w64-mingw32 ;
+# shellcheck disable=SC2043
+#for LMI_TRIPLET in i686-w64-mingw32 ;
+# "${=...} expansion--see zsh faq 3.1:
+# "Why does $var where var="foo bar" not do what I expect?"
+for LMI_TRIPLET in ${=triplets} ;
do
# Directory for test logs.
#
@@ -154,6 +168,11 @@ mkdir --parents "$log_dir"
{
printf 'LMI_TRIPLET = "%s"\n' "$LMI_TRIPLET" > /dev/tty
+# Cannot recursively check script on path determined at runtime, so
+# a directive like 'source="$srcdir"' doesn't work.
+# shellcheck disable=SC1090
+. "$srcdir"/set_toolchain.sh
+
cd /opt/lmi/src/lmi
printf '\n# test concinnity\n\n'