From 0fdccf4e5114d4fb22ea92e2252d0c6ed3d19985 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Thu, 9 Nov 2023 13:58:00 +0100 Subject: [PATCH] logs --- tests-ng/dry.sh | 8 +++++++- tests.sh | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tests-ng/dry.sh b/tests-ng/dry.sh index c7c248a..b56d510 100755 --- a/tests-ng/dry.sh +++ b/tests-ng/dry.sh @@ -113,18 +113,21 @@ _EOF echo "dry install" cd "${ddpath}" | ${bin} install -c "${cfg}" -f -p p1 -V --dry +echo "test tmpd:${tmpd}" cnt=$(find "${tmpd}" -depth 1 -type f | wc -l) ls -1 "${tmpd}" [ "${cnt}" != "0" ] && echo "dry install failed (1 -> ${cnt})" && exit 1 +echo "test tmpw:${tmpw}" cnt=$(find "${tmpw}" -depth 1 -type f | wc -l) ls -1 "${tmpw}" [ "${cnt}" != "0" ] && echo "dry install failed (2 -> ${cnt})" && exit 1 +echo "test tmpa:${tmpa}" cnt=$(find "${tmpa}" -depth 1 -type f | wc -l) ls -1 "${tmpa}" [ "${cnt}" != "0" ] && echo "dry install failed (3 -> ${cnt})" && exit 1 - +echo "dry install ok" # ----------------------------- # test import # ----------------------------- @@ -164,6 +167,7 @@ ls -1 "${tmps}"/dotfiles [ "${cnt}" != "0" ] && echo "dry import failed (1 -> ${cnt})" && exit 1 diff "${cfg}" "${tmpa}"/config.yaml || (echo "dry import failed (2)" && exit 1) +echo "dry import ok" # ----------------------------- # test update @@ -232,6 +236,7 @@ grep "modified" "${tmps}"/dotfiles/dirchildren/f1 && echo "dry update failed (4) grep "modified" "${tmps}"/dotfiles/dirchildren/f2 && echo "dry update failed (5)" && exit 1 diff "${cfg}" "${tmpa}"/config.yaml || (echo "dry update failed (6)" && exit 1) +echo "dry update ok" # ----------------------------- # test remove @@ -294,6 +299,7 @@ cd "${ddpath}" | ${bin} remove -c "${cfg}" -f -p p1 -V --dry "${tmpd}"/file "${t [ ! -e "${tmps}"/dotfiles/dirchildren/f2 ] && echo "dry remove failed (7)" && exit 1 diff "${cfg}" "${tmpa}"/config.yaml || (echo "dry remove failed (8)" && exit 1) +echo "dry remove ok" echo "OK" exit 0 diff --git a/tests.sh b/tests.sh index 425f8cf..6ead863 100755 --- a/tests.sh +++ b/tests.sh @@ -19,6 +19,13 @@ echo "current dotdrop version ${dotdrop_version}" echo "=> python version:" python3 --version +if [ -n "${GH_WORKFLOW}" ]; then + # in CI/CD + if [ -z "${TERM}" ]; then + export TERM="linux" + fi +fi + # test syntax echo "checking syntax..." "${cur}"/scripts/check-syntax.sh