| 1 | #!/usr/bin/env bash
 | 
| 2 | #
 | 
| 3 | # CI tasks.
 | 
| 4 | #
 | 
| 5 | # Usage:
 | 
| 6 | #   opy/soil.sh <function name>
 | 
| 7 | 
 | 
| 8 | set -o nounset
 | 
| 9 | set -o pipefail
 | 
| 10 | set -o errexit
 | 
| 11 | 
 | 
| 12 | REPO_ROOT=$(cd $(dirname $0)/.. ; pwd)
 | 
| 13 | 
 | 
| 14 | test-gold() {
 | 
| 15 |   pushd opy
 | 
| 16 |   ./TEST.sh gold
 | 
| 17 |   popd
 | 
| 18 | }
 | 
| 19 | 
 | 
| 20 | build-oil-repo() {
 | 
| 21 |   pushd opy
 | 
| 22 |   ./build.sh oil-repo 
 | 
| 23 |   popd
 | 
| 24 | }
 | 
| 25 | 
 | 
| 26 | regtest-compile() {
 | 
| 27 |   pushd opy
 | 
| 28 |   # NOTE: This is sensitive to Python 2.7.12 vs .13 vs .14.  Ideally we would
 | 
| 29 |   # remove that.
 | 
| 30 |   # NOTE: There is no indication if this fails!
 | 
| 31 |   ./regtest.sh compile-all
 | 
| 32 |   popd
 | 
| 33 | }
 | 
| 34 | 
 | 
| 35 | count-lines() {
 | 
| 36 |   pushd opy
 | 
| 37 |   ./count.sh all
 | 
| 38 |   popd
 | 
| 39 | }
 | 
| 40 | 
 | 
| 41 | "$@"
 |