Commit bfba444111cf79ae17c80fd39679699a5fdbb582

Authored by Jay Berkenbilt
1 parent d64b8829

Add notes about how to bisect for pikepdf failures

Showing 1 changed file with 32 additions and 0 deletions
README-maintainer
@@ -390,6 +390,38 @@ rehash @@ -390,6 +390,38 @@ rehash
390 pip3 install . 390 pip3 install .
391 pytest -n auto 391 pytest -n auto
392 392
  393 +If there are failures, use git bisect to figure out where the failure
  394 +was introduced. For example, set up a work area like this:
  395 +
  396 +cd /tmp/z
  397 +git clone file://$HOME/source/qpdf/qpdf/.git qpdf
  398 +git clone git@github.com:pikepdf/pikepdf
  399 +export QPDF_SOURCE_TREE=/tmp/z/qpdf
  400 +export QPDF_BUILD_LIBDIR=$QPDF_SOURCE_TREE/build/libqpdf
  401 +export LD_LIBRARY_PATH=$QPDF_BUILD_LIBDIR
  402 +cd qpdf
  403 +mkdir build
  404 +cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
  405 + -DMAINTAINER_MODE=1 -DBUILD_STATIC_LIBS=0 \
  406 + -DCMAKE_BUILD_TYPE=RelWithDebInfo
  407 +cat <<'EOF'
  408 +#!/bin/bash
  409 +cd /tmp/z/pikepdf
  410 +cmake --build /tmp/z/qpdf/build -j16 --target libqpdf -- -k
  411 +git clean -dfx
  412 +rm -rf ../v
  413 +virtualenv ../v
  414 +source ../v/bin/activate
  415 +pip3 install --upgrade pip
  416 +pip3 install '.[test]'
  417 +pip3 install .
  418 +pytest -n auto
  419 +EOF
  420 +chmod +x /tmp/check
  421 +
  422 +Then in /tmp/z/qpdf, run git bisect. Use /tmp/check at each stage to
  423 +test whether it's a good or bad commit.
  424 +
393 * Run package tests: 425 * Run package tests:
394 426
395 (Note: can't use DESTDIR because pkg-config won't know about it.) 427 (Note: can't use DESTDIR because pkg-config won't know about it.)