summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/safetynet.md23
1 files changed, 22 insertions, 1 deletions
diff --git a/docs/safetynet.md b/docs/safetynet.md
index 3ec1ccc5d0..5dc482b420 100644
--- a/docs/safetynet.md
+++ b/docs/safetynet.md
@@ -159,4 +159,25 @@ will be cached, if --this-repo is not enabled. Defaults to /tmp.
## Setup a nightly job
-TODO: Complete with safetynet_job.py setup and usage.
+Create a separate checkout of pdfium in a new directory, for example `~/job`.
+The safetynet_job.py script will run from this directory. This checkout needs to
+be `git pull`'ed when there are changes to the SafetyNet scripts, but otherwise
+it can be left alone.
+
+Create a directory to contain the job results, for example `~/job_results`. In
+each run, a `.log` file with the results will be written to this directory and a
+subdirectory will be created with the other artifacts.
+
+Setup a cron job to run safetynet_job.py nightly. The example below runs it at
+1:42 AM, over the corpus in two directories: `~/pdf_samples/thousand_pdfs` and
+`~/pdf_samples/i18n`
+
+```shell
+@ crontab -e
+42 1 * * * bash -lc '~/job/pdfium/testing/tools/safetynet_job.py ~/job_results ~/pdf_samples/thousand_pdfs ~/pdf_samples/i18n --output-to-log >> ~/job_results/cron_nightly.log 2>&1'
+```
+
+The first time the job runs, it will just create a checkpoint as
+`~/job_results/last_revision_covered`. From then on, since a checkpoint is
+available, each run will compare performance with the last checkpoint and update
+the checkpoint.