summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-07-23 14:17:55 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-07-23 14:17:55 +0100
commite56ae9f1a75f44a702d1965bc543e84b43db2fff (patch)
tree92700de7cb7e69cb7844f2c19e86219ded0c5181
parentccc81eec81f962ba453383556ce1d5a1c2f490f9 (diff)
parentbd08b2ffd465dbaeca826d7f30933e3843beaf58 (diff)
downloadcmdtest-e56ae9f1a75f44a702d1965bc543e84b43db2fff.tar.gz
Merge branch 'master' of git://gitorious.org/cmdtest/cmdtest
-rwxr-xr-xrun-yarn5
-rwxr-xr-xyarn11
-rwxr-xr-xyarn.tests/assuming-failure.script2
-rwxr-xr-xyarn.tests/assuming.script2
-rwxr-xr-xyarn.tests/finally.script2
-rwxr-xr-xyarn.tests/multi.script2
-rw-r--r--yarn.tests/multi.stdout1
-rwxr-xr-xyarn.tests/no-act.script2
-rwxr-xr-xyarn.tests/selected-test.script2
-rwxr-xr-xyarn.tests/shell-lib.script2
-rwxr-xr-xyarn.tests/simple.script2
-rw-r--r--yarn.tests/simple.stderr6
-rwxr-xr-xyarn.tests/snapshot.script2
-rwxr-xr-xyarn.tests/warn-if-empty.script2
14 files changed, 21 insertions, 22 deletions
diff --git a/run-yarn b/run-yarn
new file mode 100755
index 0000000..596996f
--- /dev/null
+++ b/run-yarn
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -eu
+
+./yarn --no-default-config --quiet "$@"
diff --git a/yarn b/yarn
index 9847a68..842f308 100755
--- a/yarn
+++ b/yarn
@@ -89,11 +89,12 @@ class YarnRunner(cliapp.Application):
self.ts.error(msg)
def process_args(self, args):
- # Do we have tty? If not, turn on --verbose.
- try:
- open('/dev/tty', 'w')
- except IOError:
- self.settings['verbose'] = True
+ # Do we have tty? If not, turn on --verbose, unless --quiet.
+ if not self.settings['quiet']:
+ try:
+ open('/dev/tty', 'w')
+ except IOError:
+ self.settings['verbose'] = True
self.ts = ttystatus.TerminalStatus(period=0.001)
if not self.settings['quiet'] and not self.settings['verbose']:
diff --git a/yarn.tests/assuming-failure.script b/yarn.tests/assuming-failure.script
index f630294..9752e39 100755
--- a/yarn.tests/assuming-failure.script
+++ b/yarn.tests/assuming-failure.script
@@ -17,7 +17,7 @@ cat <<EOF > "$DATADIR/test.yarn"
touch "$DATADIR/cleanup-flag"
EOF
-./yarn -q "$DATADIR/test.yarn"
+./run-yarn "$DATADIR/test.yarn"
[ ! -e "$DATADIR/then-flag" ]
[ ! -e "$DATADIR/cleanup-flag" ]
diff --git a/yarn.tests/assuming.script b/yarn.tests/assuming.script
index 9471280..52eee36 100755
--- a/yarn.tests/assuming.script
+++ b/yarn.tests/assuming.script
@@ -17,7 +17,7 @@ cat <<EOF > "$DATADIR/test.yarn"
touch "$DATADIR/cleanup-flag"
EOF
-./yarn -q "$DATADIR/test.yarn"
+./run-yarn "$DATADIR/test.yarn"
[ -e "$DATADIR/then-flag" ]
[ -e "$DATADIR/cleanup-flag" ]
diff --git a/yarn.tests/finally.script b/yarn.tests/finally.script
index 2d383a0..4e05d2e 100755
--- a/yarn.tests/finally.script
+++ b/yarn.tests/finally.script
@@ -22,5 +22,5 @@ cat <<EOF > "$DATADIR/finally.yarn"
touch "$DATADIR/finally.has.run"
EOF
-./yarn -q "$DATADIR/finally.yarn"
+./run-yarn "$DATADIR/finally.yarn"
test -e "$DATADIR/finally.has.run"
diff --git a/yarn.tests/multi.script b/yarn.tests/multi.script
index 35818fa..c8131da 100755
--- a/yarn.tests/multi.script
+++ b/yarn.tests/multi.script
@@ -19,5 +19,5 @@ cat <<EOF > "$DATADIR/2.yarn"
true
EOF
-./yarn "$DATADIR/1.yarn" "$DATADIR/2.yarn" |
+./run-yarn "$DATADIR/1.yarn" "$DATADIR/2.yarn" |
sed 's/, in .* seconds$//'
diff --git a/yarn.tests/multi.stdout b/yarn.tests/multi.stdout
deleted file mode 100644
index 22c4303..0000000
--- a/yarn.tests/multi.stdout
+++ /dev/null
@@ -1 +0,0 @@
-Scenario test suite PASS, with 1 scenarios
diff --git a/yarn.tests/no-act.script b/yarn.tests/no-act.script
index 983f115..cc924da 100755
--- a/yarn.tests/no-act.script
+++ b/yarn.tests/no-act.script
@@ -19,4 +19,4 @@ cat <<EOF > "$DATADIR/fail.yarn"
false
EOF
-./yarn -q -n "$DATADIR/fail.yarn"
+./run-yarn -n "$DATADIR/fail.yarn"
diff --git a/yarn.tests/selected-test.script b/yarn.tests/selected-test.script
index 69c1679..2c4521d 100755
--- a/yarn.tests/selected-test.script
+++ b/yarn.tests/selected-test.script
@@ -13,6 +13,6 @@ cat << EOF > "$DATADIR/test.yarn"
touch "$DATADIR/\$MATCH_1"
EOF
-./yarn -q "$DATADIR/test.yarn" --run 'foo test'
+./run-yarn "$DATADIR/test.yarn" --run 'foo test'
test -e "$DATADIR/foo"
! test -e "$DATADIR/bar"
diff --git a/yarn.tests/shell-lib.script b/yarn.tests/shell-lib.script
index fb820d4..68e4eb1 100755
--- a/yarn.tests/shell-lib.script
+++ b/yarn.tests/shell-lib.script
@@ -2,4 +2,4 @@
set -eu
-./yarn -q --shell-library shell-lib.sh shell-lib.yarn
+./run-yarn --shell-library shell-lib.sh shell-lib.yarn
diff --git a/yarn.tests/simple.script b/yarn.tests/simple.script
index 3382af7..70d6103 100755
--- a/yarn.tests/simple.script
+++ b/yarn.tests/simple.script
@@ -2,4 +2,4 @@
set -eu
-./yarn simple.scenario
+./run-yarn simple.scenario
diff --git a/yarn.tests/simple.stderr b/yarn.tests/simple.stderr
index 3df1113..df917a0 100644
--- a/yarn.tests/simple.stderr
+++ b/yarn.tests/simple.stderr
@@ -1,7 +1 @@
-ERROR: In scenario "a simple scenario"
-step "THEN not all is well" failed,
-with exit code 1:
-Standard output from shell command:
-Standard error from shell command:
-
ERROR: Test suite FAILED in 1 scenarios
diff --git a/yarn.tests/snapshot.script b/yarn.tests/snapshot.script
index e8947ad..def73a8 100755
--- a/yarn.tests/snapshot.script
+++ b/yarn.tests/snapshot.script
@@ -23,7 +23,7 @@ cat << EOF > "$DATADIR/foo.yarn"
touch "\$DATADIR/\$MATCH_1.then"
EOF
-./yarn -q --snapshot --tempdir "$DATADIR/tmp" "$DATADIR/foo.yarn"
+./run-yarn --snapshot --tempdir "$DATADIR/tmp" "$DATADIR/foo.yarn"
test -e "$DATADIR/tmp/bar"
test -e "$DATADIR/tmp/bar/datadir"
diff --git a/yarn.tests/warn-if-empty.script b/yarn.tests/warn-if-empty.script
index 3594929..03be52d 100755
--- a/yarn.tests/warn-if-empty.script
+++ b/yarn.tests/warn-if-empty.script
@@ -6,5 +6,5 @@ touch "$DATADIR/empty.yarn"
# The grep below will fail unless the string exists, thereby failing the
# entire test.
-./yarn --log=/dev/stdout "$DATADIR/empty.yarn" 2>&1 |
+./run-yarn --no-quiet --log=/dev/stdout "$DATADIR/empty.yarn" 2>&1 |
grep 'No scenario code blocks' > /dev/null