Inserting tests and conditionals in resonse to shellcheck warnings.

This commit is contained in:
Richard Brooksby 2023-01-14 09:15:42 +00:00
parent 88969db521
commit fdfbadc940
3 changed files with 15 additions and 13 deletions

View file

@ -26,14 +26,14 @@ case "$ARCH-$OS" in
*-Darwin)
CONFIGURATION=Debug
(
cd -- "$CODE"
xcrun xcodebuild -config "$CONFIGURATION" clean
cd -- "$CODE" &&
xcrun xcodebuild -config "$CONFIGURATION" clean &&
xcrun xcodebuild -config "$CONFIGURATION" -target testrun \
GCC_GENERATE_TEST_COVERAGE_FILES=YES \
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES
)
(
cd -- "$CODE/xc/$PROJECT.build/$CONFIGURATION/$PROJECT.build/Objects-normal/$ARCH"
cd -- "$CODE/xc/$PROJECT.build/$CONFIGURATION/$PROJECT.build/Objects-normal/$ARCH" &&
xcrun gcov mps.c 2> /dev/null
) | "$TOOL/gcovfmt"
;;

View file

@ -43,8 +43,9 @@ CLANG_REMOTE=https://github.com/kripken/emscripten-fastcomp-clang
# Directory to put everything in
TESTDIR="$PWD/.test"
mkdir -p -- "$TESTDIR"
cd -- "$TESTDIR"
mkdir -p -- "$TESTDIR" &&
cd -- "$TESTDIR" ||
exit 1
# 3. UTILITIES
@ -61,7 +62,7 @@ checkout () {
git clone --recursive -- "$REMOTE" "$REPO"
fi
(
cd -- "$REPO"
cd -- "$REPO" &&
git pull
)
}
@ -76,15 +77,15 @@ checkout emscripten "$EMSCRIPTEN_REMOTE"
checkout emscripten-fastcomp "$FASTCOMP_REMOTE"
(
cd emscripten-fastcomp
cd emscripten-fastcomp &&
(
cd tools
cd tools &&
checkout clang "$CLANG_REMOTE";
)
mkdir -p build
(
cd build
../configure --enable-optimized --disable-assertions --enable-targets=host,js
cd build &&
../configure --enable-optimized --disable-assertions --enable-targets=host,js &&
make;
)
)

View file

@ -43,8 +43,9 @@ REMOTE=https://github.com/dylan-lang/opendylan.git
# Directory to put everything in
TESTDIR="$PWD/.test/$GC"
mkdir -p -- "$TESTDIR"
cd -- "$TESTDIR"
mkdir -p -- "$TESTDIR" &&
cd -- "$TESTDIR" ||
exit 1
# 3. PROCEDURE
@ -116,7 +117,7 @@ if [ -f "$REPO/Makefile" ]; then
else (
cd -- "$REPO" &&
./autogen.sh &&
./configure --with-gc="$GC" --prefix="$PREFIX" $CONFIGURE
./configure --with-gc="$GC" --prefix="$PREFIX" "$CONFIGURE"
) fi
(
cd -- "$REPO" &&