Skip to content

Commit cfa41a9

Browse files
jbachorikclaude
andcommitted
Add build verification and diagnostics
Verify libraries are built successfully and show what was actually produced if builds fail to create expected artifacts. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 937a7e3 commit cfa41a9

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

ddprof-lib/benchmarks/branch-prediction/compare_branch_prediction.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,29 @@ main() {
142142
cd "${BASELINE_WORKTREE}"
143143
./gradlew ddprof-lib:build -x test
144144

145+
# Verify baseline library was built
146+
local baseline_lib_check="${BASELINE_WORKTREE}/ddprof-lib/build/lib/main/release/linux/x64/libjavaProfiler.so"
147+
if [ ! -f "${baseline_lib_check}" ]; then
148+
log_error "Baseline build did not produce library at ${baseline_lib_check}"
149+
log_info "Checking what was built:"
150+
find "${BASELINE_WORKTREE}/ddprof-lib/build" -name "*.so" -type f 2>/dev/null || true
151+
exit 1
152+
fi
153+
145154
# Build optimized
146155
log_step "4/6: Building optimized version..."
147156
cd "${OPTIMIZED_WORKTREE}"
148157
./gradlew ddprof-lib:build -x test
149158

159+
# Verify optimized library was built
160+
local optimized_lib_check="${OPTIMIZED_WORKTREE}/ddprof-lib/build/lib/main/release/linux/x64/libjavaProfiler.so"
161+
if [ ! -f "${optimized_lib_check}" ]; then
162+
log_error "Optimized build did not produce library at ${optimized_lib_check}"
163+
log_info "Checking what was built:"
164+
find "${OPTIMIZED_WORKTREE}/ddprof-lib/build" -name "*.so" -type f 2>/dev/null || true
165+
exit 1
166+
fi
167+
150168
# Test baseline
151169
log_step "5/6: Testing baseline version..."
152170
local baseline_test_script="${OPTIMIZED_WORKTREE}/ddprof-lib/benchmarks/branch-prediction/test_branch_prediction_perf.sh"

0 commit comments

Comments
 (0)