diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-02-08 18:18:27 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-02-08 18:18:27 -0500 |
commit | c46a331f88adc0bbcc74e200f1f7a967630e966d (patch) | |
tree | 07941a605b9488c0b108f36ed646b3df816c7b7a /windows | |
parent | a056befe6e8fc3056489b515e08c43a02a525479 (diff) | |
download | libgd-c46a331f88adc0bbcc74e200f1f7a967630e966d.tar.gz |
a few more shellcheck fixes
Diffstat (limited to 'windows')
-rwxr-xr-x | windows/msys/run_tests.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/windows/msys/run_tests.sh b/windows/msys/run_tests.sh index 0856d96..b959afe 100755 --- a/windows/msys/run_tests.sh +++ b/windows/msys/run_tests.sh @@ -9,8 +9,12 @@ CFLAGS_EXTRA=$2 # Extra C flags LOG=run_tests.log -CFLAGS="-g -Igdtest/ -I. -I../src/ -D_WIN32 -DHAVE_SYS_STAT_H $CFLAGS_EXTRA" -LDFLAGS='-L../src -llibgd' +CFLAGS=( -g -Igdtest/ -I. -I../src/ -D_WIN32 -DHAVE_SYS_STAT_H ) +if [[ -n "${CFLAGS_EXTRA}" ]]; then + # shellcheck disable=SC2206 + CFLAGS+=( ${CFLAGS_EXTRA} ) +fi +LDFLAGS=( -L../src -llibgd ) DLLPATH=../src:$DLLPATH_EXTRA run_gcc() { @@ -32,7 +36,7 @@ cd ../../tests echo "Setting up..." rm -f "${LOG}" [ -f test_config.h ] || echo '#define GDTEST_TOP_DIR "."' > test_config.h -run_gcc -c $CFLAGS gdtest/gdtest.c +run_gcc -c "${CFLAGS[@]}" gdtest/gdtest.c echo "Running tests:" @@ -43,7 +47,7 @@ for test in $(find . -name '*.c' | grep -vE '^./(fontconfig|gdtest|gdhelpers|xpm : $(( count += 1 )) exe=${test%.c}.exe - if run_gcc -o "${exe}" ${CFLAGS} ${LDFLAGS} "${test}" gdtest.o; then + if run_gcc -o "${exe}" "${CFLAGS[@]}" "${LDFLAGS[@]}" "${test}" gdtest.o; then true else echo "COMPILE_FAIL: $test" |