From 91f336a23d674859e24c27024998e5b6d849b4ca Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Fri, 8 May 2015 22:05:04 +0200 Subject: [PATCH] Removes reference to very old Python server (now Node.js server) and many textual improvements --- Bisecting-a-Regression.md | 73 ++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/Bisecting-a-Regression.md b/Bisecting-a-Regression.md index dea1c3a..624ac41 100644 --- a/Bisecting-a-Regression.md +++ b/Bisecting-a-Regression.md @@ -1,56 +1,51 @@ -## 1) At a minimum you'll need: -- git (on windows http://msysgit.github.io) -- a server, if you have python (or XAMPP/WAMP) installed that will work +## 1) At a minimum you will need: +- Git +- Node.js -## 2) Getting pdf.js -- startup the git command line from above -- move a directory where you want it to live, if you're using a server that isn't python go into the directory where your wwwroot is -- `git clone https://github.com/mozilla/pdf.js.git` +## 2) Getting PDF.js +- Start the git command line +- Change to a directory where you want to place PDF.js +- Run `git clone git://github.com/mozilla/pdf.js.git` -## 3) Open pdf.js +## 3) Open PDF.js -### Option 1 - Python Server -- `cd pdf.js/test` -- `python test.py --noDownload` -- open firefox and check http://localhost:8080/web/viewer.html goes to the pdf viewer -- open different terminal tab/window -- `cd pdf.js` +### Option 1 - Node.js server +- Run `cd pdf.js` +- Run `node make server` +- Open a browser and go to `http://localhost:8080/web/viewer.html` -### Option 2 - Other Server -- go to `http:///pdf.js/web/viewer.html` +### Option 2 - Another server +- Open a browser and go to `http:///pdf.js/web/viewer.html` -## 4) Verify the Regression -- Download the bad PDF and save it in pdf.js/test/pdfs -- go to `?file=../test/pdfs/` and verify the PDF is broken +## 4) Verify the regression +- Download the bad PDF and open it with the above viewer (using, for example, the Open File button in the toolbar) and verify that the PDF is broken ## 5) Start the bisecting process - Mark the current version as bad using `git bisect start` and `git bisect bad` -## 6) Find bad commit id +## 6) Find bad commit ID -### Option 1 - Detecting version / commit of the pdf.js installed in the Firefox -- Open resource://pdf.js/build/pdf.js -- Find commit in the line with 'PDFJS.build = ' -- Find version in the line with 'PDFJS.version = ' +### Option 1 - Detecting version / commit of PDF.js installed in Firefox +- Open `resource://pdf.js/build/pdf.js` +- Find the commit in the line with 'PDFJS.build = ' +- Find the version in the line with 'PDFJS.version = ' -### Option 2 - Using bugzilla patch -- A bugzilla patch contains the commits information near ' -browser/extensions/pdfjs/content/build/pdf.js' - [e.g. see https://bug871530.bugzilla.mozilla.org/attachment.cgi?id=750657, was added3d (good), will be 869b878 (bad)] +### Option 2 - Using Bugzilla patch +- A Bugzilla patch contains the commit information near `browser/extensions/pdfjs/content/build/pdf.js` [e.g., see https://bug871530.bugzilla.mozilla.org/attachment.cgi?id=750657, was added3d (good), will be 869b878 (bad)] ### Option 3 - Using MXR -- If you know it was good in beta or aurora get the bad commit id from mxr -Find the line with 'PDFJS.build = ' and copy the value in the single quotes e.g. 4e83123 -auora - http://mxr.mozilla.org/mozilla-aurora/source/browser/extensions/pdfjs/content/build/pdf.js#24 -beta - http://mxr.mozilla.org/mozilla-beta/source/browser/extensions/pdfjs/content/build/pdf.js#24 +- If you know it was good in the Beta or Aurora branch, get the bad commit ID from MXR. Find the line with 'PDFJS.build = ' and copy the value in the single quotes, e.g., 4e83123. -## 7) Verify the Working Version -- `git checkout ` -- Full refresh(ctr+shift+r) Firefox and verify the PDF no longer works. +Aurora: http://mxr.mozilla.org/mozilla-aurora/source/browser/extensions/pdfjs/content/build/pdf.js#24 +Beta: http://mxr.mozilla.org/mozilla-beta/source/browser/extensions/pdfjs/content/build/pdf.js#24 + +## 7) Verify the working version +- `git checkout ` +- Full refresh (CTRL + Shift + R) Firefox and verify that the PDF no longer works - Mark it as good `git bisect good` ## 8) Continue bisecting -- Full refresh(ctr+shift+r) of the viewer in Firefox -- If the current version works `git bisect good` -- If it fails `git bisect bad` -- Repeat same steps as above if it's bad `git bisect bad` if it's good `git bisect good` +- Full refresh (CTRL + Shift + R) of the viewer in Firefox +- If the current version works, mark it using `git bisect good` +- If it fails, mark it using `git bisect bad` +- Repeat the steps above \ No newline at end of file