Skip to content

Commit af81811

Browse files
ci: simplified report structure
1 parent 223e155 commit af81811

1 file changed

Lines changed: 27 additions & 40 deletions

File tree

releng/update-site-tests/run-single-case.sh

Lines changed: 27 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ OUTROOT="${OUTROOT:-$ROOT_DIR/out}"
1616

1717
CASE_DIR="$OUTROOT/$CASE_ID"
1818
LOGDIR="$CASE_DIR/logs"
19-
REPORT="$CASE_DIR/report.txt"
2019
WORKDIR="$WORKROOT/$CASE_ID"
2120

2221
mkdir -p "$LOGDIR" "$WORKDIR"
@@ -108,7 +107,7 @@ list_ius () {
108107
"$LAUNCHER" \
109108
-nosplash \
110109
-application org.eclipse.equinox.p2.director \
111-
-listInstalledIUs \
110+
-list \
112111
"${P2_DEST_ARGS[@]}" \
113112
-consoleLog \
114113
> "$LOGDIR/$out" 2>&1 || true
@@ -143,11 +142,6 @@ fi
143142
list_ius "installed-ius.txt"
144143
list_roots "installed-roots.txt"
145144

146-
# Extract versions from combined log (best-effort)
147-
STABLE_VER="$(grep -Eo "Installing $FEATURE_ID [^[:space:]]+" "$RUNLOG" | awk '{print $3}' | tail -n1 || true)"
148-
DEV_VER="$(grep -Eo "Installing $FEATURE_ID [^[:space:]]+" "$RUNLOG" | awk '{print $3}' | tail -n1 || true)"
149-
REMOVED_VER="$(grep -Eo "Uninstalling $FEATURE_ID [^[:space:]]+" "$RUNLOG" | awk '{print $3}' | tail -n1 || true)"
150-
151145
# Conflict scan (from combined log)
152146
ERROR_PATTERNS='conflict|cannot complete|missing requirement|Only one of the following can be installed'
153147
if grep -Ein "$ERROR_PATTERNS" "$RUNLOG" >/dev/null 2>&1; then
@@ -156,38 +150,31 @@ else
156150
HAS_CONFLICTS=0
157151
fi
158152

159-
# Report
160-
{
161-
echo "ESP Eclipse Plug-in Update Path Report"
162-
echo "====================================="
163-
echo ""
164-
echo "Case: $CASE_ID"
165-
echo "Base product: $BASE_PRODUCT"
166-
[[ -n "${ECLIPSE_P2_REPO:-}" ]] && echo "Eclipse P2 repo: $ECLIPSE_P2_REPO"
167-
[[ -n "${ECLIPSE_URL:-}" ]] && echo "Eclipse URL: $ECLIPSE_URL"
168-
echo ""
169-
echo "IEP stable repo: $IEP_STABLE_REPO"
170-
echo "IEP dev repo: $IEP_DEV_REPO"
171-
echo ""
172-
echo "Versions (best-effort from logs):"
173-
echo " Stable installed: ${STABLE_VER:-<unknown>}"
174-
if [[ "${DO_DEV_UPDATE:-0}" == "1" ]]; then
175-
echo " Dev installed: ${DEV_VER:-<unknown>}"
176-
echo " Dev replaced: ${REMOVED_VER:-<unknown>}"
177-
fi
153+
# Summary
154+
echo ""
155+
echo "ESP Eclipse Plug-in Update Path Summary"
156+
echo "======================================="
157+
echo ""
158+
echo "Case: $CASE_ID"
159+
echo "Base product: $BASE_PRODUCT"
160+
[[ -n "${ECLIPSE_P2_REPO:-}" ]] && echo "Eclipse P2 repo: $ECLIPSE_P2_REPO"
161+
[[ -n "${ECLIPSE_URL:-}" ]] && echo "Eclipse URL: $ECLIPSE_URL"
162+
echo ""
163+
echo "IEP stable repo: $IEP_STABLE_REPO"
164+
echo "IEP dev repo: $IEP_DEV_REPO"
165+
echo ""
166+
167+
ERROR_PATTERNS='conflict|cannot complete|missing requirement|Only one of the following can be installed'
168+
if grep -Ein "$ERROR_PATTERNS" "$RUNLOG" >/dev/null 2>&1; then
169+
echo "Conflicts (grep scan in logs/run.log):"
170+
echo "Found (see above in run.log)"
178171
echo ""
172+
echo "STATUS: FAILED"
173+
exit 2
174+
else
179175
echo "Conflicts (grep scan in logs/run.log):"
180-
if [[ "$HAS_CONFLICTS" == "1" ]]; then
181-
echo "Found (see logs/run.log)"
182-
echo ""
183-
echo "STATUS: FAILED (conflict patterns detected)"
184-
exit_code=2
185-
else
186-
echo "None"
187-
echo ""
188-
echo "STATUS: PASSED"
189-
exit_code=0
190-
fi
191-
} > "$REPORT"
192-
193-
exit "${exit_code:-0}"
176+
echo "None"
177+
echo ""
178+
echo "STATUS: PASSED"
179+
exit 0
180+
fi

0 commit comments

Comments
 (0)