| 1 | #!/usr/bin/env bash
 | 
| 2 | 
 | 
| 3 | set -o nounset
 | 
| 4 | set -o pipefail
 | 
| 5 | set -o errexit
 | 
| 6 | 
 | 
| 7 | REPO_ROOT=$(cd "$(dirname $0)/.."; pwd)
 | 
| 8 | 
 | 
| 9 | source soil/web-worker.sh
 | 
| 10 | source test/common.sh
 | 
| 11 | 
 | 
| 12 | test-format-wwz-index() {
 | 
| 13 |   soil/worker.sh JOB-dummy
 | 
| 14 | 
 | 
| 15 |   local out=_tmp/format-wwz-index.html
 | 
| 16 | 
 | 
| 17 |   format-wwz-index DUMMY_JOB_ID > $out
 | 
| 18 |   echo "Wrote $out"
 | 
| 19 | }
 | 
| 20 | 
 | 
| 21 | test-make-job-wwz() {
 | 
| 22 |   make-job-wwz dummy
 | 
| 23 | 
 | 
| 24 |   # Makes it in the root dir
 | 
| 25 |   ls -l *.wwz
 | 
| 26 |   unzip -l dummy.wwz
 | 
| 27 | }
 | 
| 28 | 
 | 
| 29 | test-image-stats() {
 | 
| 30 |   # NOTE: can't run sudo automatically
 | 
| 31 |   sudo soil/host-shim.sh save-image-stats
 | 
| 32 | 
 | 
| 33 |   format-image-stats '' '../../web' > _tmp/soil/image.html
 | 
| 34 | 
 | 
| 35 |   # Problem: absolute JS and CSS links don't work here.
 | 
| 36 |   ls -l _tmp/soil/image.html
 | 
| 37 | }
 | 
| 38 | 
 | 
| 39 | all() {
 | 
| 40 |   run-test-funcs
 | 
| 41 | }
 | 
| 42 | 
 | 
| 43 | "$@"
 |