Skip to content

Commit 465f7ad

Browse files
committed
Increase CI symbol check verbosity with per-symbol status
1 parent 4d646f4 commit 465f7ad

1 file changed

Lines changed: 25 additions & 5 deletions

File tree

scripts/ci/check-linux-mysql-symbols.sh

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,31 @@ if [[ ! -s "${TMP_DIR}/mysql_imports.txt" ]]; then
9090
exit 1
9191
fi
9292

93-
MISSING_COUNT="$(
94-
LC_ALL=C comm -23 "${TMP_DIR}/mysql_imports.txt" "${TMP_DIR}/mysql_exports.txt" \
95-
| tee "${TMP_DIR}/mysql_missing.txt" \
96-
| wc -l
97-
)"
93+
LC_ALL=C comm -12 "${TMP_DIR}/mysql_imports.txt" "${TMP_DIR}/mysql_exports.txt" > "${TMP_DIR}/mysql_exported_needed.txt"
94+
LC_ALL=C comm -23 "${TMP_DIR}/mysql_imports.txt" "${TMP_DIR}/mysql_exports.txt" > "${TMP_DIR}/mysql_missing.txt"
95+
96+
IMPORT_COUNT="$(wc -l < "${TMP_DIR}/mysql_imports.txt")"
97+
EXPORTED_COUNT="$(wc -l < "${TMP_DIR}/mysql_exported_needed.txt")"
98+
MISSING_COUNT="$(wc -l < "${TMP_DIR}/mysql_missing.txt")"
99+
100+
echo "Plugin expects mysql_* symbols (${IMPORT_COUNT}):"
101+
sed 's/^/ - /' "${TMP_DIR}/mysql_imports.txt"
102+
echo
103+
echo "libmariadb exports for expected symbols (${EXPORTED_COUNT}):"
104+
if [[ "${EXPORTED_COUNT}" -gt 0 ]]; then
105+
sed 's/^/ - /' "${TMP_DIR}/mysql_exported_needed.txt"
106+
else
107+
echo " (none)"
108+
fi
109+
echo
110+
echo "Per-symbol resolution:"
111+
awk '
112+
NR == FNR { exported[$0] = 1; next }
113+
{
114+
if (exported[$0]) print " OK " $0;
115+
else print " MISSING " $0;
116+
}
117+
' "${TMP_DIR}/mysql_exports.txt" "${TMP_DIR}/mysql_imports.txt"
98118

99119
if [[ "${MISSING_COUNT}" -ne 0 ]]; then
100120
echo "ERROR: linked libmariadb is missing exported mysql_* symbols required by plugin:" >&2

0 commit comments

Comments
 (0)