diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-10-10 16:55:00 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-10 16:55:00 +0000 |
commit | 7eccfb6577d2bb4a7166d67e2dfd7b21fcabb2fb (patch) | |
tree | b62ecab6caf889547261bacd079255072378ef78 /docs | |
parent | b3a0fc30102042be6f5db0c1f644cc21ec69394a (diff) | |
download | pdfium-7eccfb6577d2bb4a7166d67e2dfd7b21fcabb2fb.tar.xz |
Document how to setup safetynet_job.py nightly.
Change-Id: I5792f5940a3195854b6117d2418c773de34f891b
Reviewed-on: https://pdfium-review.googlesource.com/c/43710
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/safetynet.md | 23 |
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. |