summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-08-08 16:30:50 +0000
committerLars Wirzenius <liw@liw.fi>2017-08-08 16:30:50 +0000
commitc2fa43760d25e772592c046f6f981e9cad4ccd75 (patch)
treef10e6dd1f63421bf9deca6f93121810a2f7890aa /check
parenta51410a3f0c723013b21ef7b22eebeb57d16a060 (diff)
downloadqvisqve-c2fa43760d25e772592c046f6f981e9cad4ccd75.tar.gz
Add: if QVARN_POSTGRES is enabled, run yarns twice
Diffstat (limited to 'check')
-rwxr-xr-xcheck18
1 files changed, 15 insertions, 3 deletions
diff --git a/check b/check
index 592539f..7dcb48e 100755
--- a/check
+++ b/check
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Copyright (C) 2017 Lars Wirzenius
#
# This program is free software: you can redistribute it and/or modify
@@ -17,10 +17,22 @@
set -eu
+run_yarns()
+{
+ yarn yarns/*.yarn \
+ -s yarns/lib.py --shell python2 --shell-arg '' --cd-datadir "$@"
+}
+
python3 -m CoverageTestRunner --ignore-missing-from=without-tests
pep8 qvarn
pylint3 -j0 --rcfile pylint.conf qvarn
-yarn yarns/*.yarn \
- -s yarns/lib.py --shell python2 --shell-arg '' --cd-datadir "$@"
+# Run yarns without Postgres. For speed.
+QVARN_POSTGRES= run_yarns "$@"
+
+if [ "${QVARN_POSTGRES:-no}" != no ]
+then
+ scripts/pgempty
+ run_yarns "$@"
+fi