From 17f5626488ac9ffe11325ff48953bae30bc2ef43 Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Wed, 13 Nov 2024 11:27:59 -0800 Subject: [PATCH] Revert test changes --- ci/pre-commit/doxygen.sh | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/ci/pre-commit/doxygen.sh b/ci/pre-commit/doxygen.sh index 5deeaa7a8..8f387c6ea 100755 --- a/ci/pre-commit/doxygen.sh +++ b/ci/pre-commit/doxygen.sh @@ -24,9 +24,7 @@ fi function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; } # Doxygen supported version 1.8.20 to 1.9.1 -doxygen --version DOXYGEN_VERSION=$(doxygen --version) -echo "$DOXYGEN_VERSION" if [ $(version "$DOXYGEN_VERSION") -lt $(version "1.8.20") ] || [ $(version $DOXYGEN_VERSION) -gt $(version "1.9.1") ]; then echo -e "Warning: Unsupported Doxygen version $DOXYGEN_VERSION" echo -e "Expecting Doxygen version from 1.8.20 to 1.9.1" @@ -36,22 +34,16 @@ fi # Run doxygen, ignore missing tag files error TAG_ERROR1="error: Tag file '.*.tag' does not exist or is not a file. Skipping it..." TAG_ERROR2="error: cannot open tag file .*.tag for writing" - -cd doxygen -echo "--- Doxyfile ---" -cat Doxyfile -echo "----------------" -doxygen - +DOXYGEN_STDERR=`cd doxygen && { cat Doxyfile ; echo QUIET = YES; echo GENERATE_HTML = NO; } | doxygen - 2>&1 | sed "/\($TAG_ERROR1\|$TAG_ERROR2\)/d"` RETVAL=$? -#if [ "$RETVAL" != "0" ] || [ ! -z "$DOXYGEN_STDERR" ]; then -echo -e "\n>>>> FAILED: doxygen check; begin output\n" -echo -e "$DOXYGEN_STDERR" -echo -e "\n>>>> FAILED: doxygen check; end output\n" -# RETVAL=1 #because return value is not generated by doxygen 1.8.17 -#else -# echo -e "\n>>>> PASSED: doxygen check\n" -#fi +if [ "$RETVAL" != "0" ] || [ ! -z "$DOXYGEN_STDERR" ]; then + echo -e "\n>>>> FAILED: doxygen check; begin output\n" + echo -e "$DOXYGEN_STDERR" + echo -e "\n>>>> FAILED: doxygen check; end output\n" + RETVAL=1 #because return value is not generated by doxygen 1.8.17 +else + echo -e "\n>>>> PASSED: doxygen check\n" +fi exit $RETVAL