author | timeless <timeless@mozdev.org> |
Tue, 05 Jan 2016 22:46:04 +0000 | |
changeset 27676 | 1c48f348f2d0 |
parent 27602 | 67aa88e00fc7 |
child 27686 | df142b77b4c2 |
permissions | -rw-r--r-- |
21732
b6192ea7f7fd
test: introduce test-run-tests.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
1 |
This file tests the behavior of run-tests.py itself. |
b6192ea7f7fd
test: introduce test-run-tests.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
2 |
|
24960
65e8dac7b016
test-run-test: unset run-test specific environment variables
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
3 |
Avoid interference from actual test env: |
65e8dac7b016
test-run-test: unset run-test specific environment variables
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
4 |
|
65e8dac7b016
test-run-test: unset run-test specific environment variables
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
5 |
$ unset HGTEST_JOBS |
65e8dac7b016
test-run-test: unset run-test specific environment variables
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
6 |
$ unset HGTEST_TIMEOUT |
65e8dac7b016
test-run-test: unset run-test specific environment variables
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
7 |
$ unset HGTEST_PORT |
65e8dac7b016
test-run-test: unset run-test specific environment variables
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
8 |
$ unset HGTEST_SHELL |
65e8dac7b016
test-run-test: unset run-test specific environment variables
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
9 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
10 |
Smoke test with install |
21732
b6192ea7f7fd
test: introduce test-run-tests.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
11 |
============ |
b6192ea7f7fd
test: introduce test-run-tests.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
12 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
13 |
$ run-tests.py $HGTEST_RUN_TESTS_PURE -l |
21732
b6192ea7f7fd
test: introduce test-run-tests.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
14 |
|
b6192ea7f7fd
test: introduce test-run-tests.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
15 |
# Ran 0 tests, 0 skipped, 0 warned, 0 failed. |
21734
34e0bd895afc
test-run-tests.t: test running a passing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21732
diff
changeset
|
16 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
17 |
Define a helper to avoid the install step |
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
18 |
============= |
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
19 |
$ rt() |
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
20 |
> { |
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
21 |
> run-tests.py --with-hg=`which hg` "$@" |
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
22 |
> } |
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
23 |
|
21734
34e0bd895afc
test-run-tests.t: test running a passing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21732
diff
changeset
|
24 |
a succesful test |
34e0bd895afc
test-run-tests.t: test running a passing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21732
diff
changeset
|
25 |
======================= |
34e0bd895afc
test-run-tests.t: test running a passing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21732
diff
changeset
|
26 |
|
34e0bd895afc
test-run-tests.t: test running a passing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21732
diff
changeset
|
27 |
$ cat > test-success.t << EOF |
34e0bd895afc
test-run-tests.t: test running a passing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21732
diff
changeset
|
28 |
> $ echo babar |
34e0bd895afc
test-run-tests.t: test running a passing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21732
diff
changeset
|
29 |
> babar |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
30 |
> $ echo xyzzy |
25388
6025cac3d02f
tests: add (?) flag for optional lines
Matt Mackall <mpm@selenic.com>
parents:
25098
diff
changeset
|
31 |
> never happens (?) |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
32 |
> xyzzy |
25388
6025cac3d02f
tests: add (?) flag for optional lines
Matt Mackall <mpm@selenic.com>
parents:
25098
diff
changeset
|
33 |
> nor this (?) |
21734
34e0bd895afc
test-run-tests.t: test running a passing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21732
diff
changeset
|
34 |
> EOF |
34e0bd895afc
test-run-tests.t: test running a passing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21732
diff
changeset
|
35 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
36 |
$ rt |
21734
34e0bd895afc
test-run-tests.t: test running a passing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21732
diff
changeset
|
37 |
. |
34e0bd895afc
test-run-tests.t: test running a passing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21732
diff
changeset
|
38 |
# Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
21738
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
39 |
|
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
40 |
failing test |
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
41 |
================== |
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
42 |
|
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
43 |
$ cat > test-failure.t << EOF |
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
44 |
> $ echo babar |
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
45 |
> rataxes |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
46 |
> This is a noop statement so that |
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
47 |
> this test is still more bytes than success. |
21738
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
48 |
> EOF |
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
49 |
|
24500
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
50 |
>>> fh = open('test-failure-unicode.t', 'wb') |
25054
af5a778f8e2e
test-run-tests.t: work around file.write() returning an int
Augie Fackler <augie@google.com>
parents:
24990
diff
changeset
|
51 |
>>> fh.write(u' $ echo babar\u03b1\n'.encode('utf-8')) and None |
af5a778f8e2e
test-run-tests.t: work around file.write() returning an int
Augie Fackler <augie@google.com>
parents:
24990
diff
changeset
|
52 |
>>> fh.write(u' l\u03b5\u03b5t\n'.encode('utf-8')) and None |
24500
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
53 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
54 |
$ rt |
21738
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
55 |
|
23348
bbe56e07e07a
tests: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
23245
diff
changeset
|
56 |
--- $TESTTMP/test-failure.t |
bbe56e07e07a
tests: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
23245
diff
changeset
|
57 |
+++ $TESTTMP/test-failure.t.err |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
58 |
@@ -1,4 +1,4 @@ |
21738
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
59 |
$ echo babar |
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
60 |
- rataxes |
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
61 |
+ babar |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
62 |
This is a noop statement so that |
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
63 |
this test is still more bytes than success. |
21738
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
64 |
|
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
65 |
ERROR: test-failure.t output changed |
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
66 |
!. |
24500
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
67 |
--- $TESTTMP/test-failure-unicode.t |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
68 |
+++ $TESTTMP/test-failure-unicode.t.err |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
69 |
@@ -1,2 +1,2 @@ |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
70 |
$ echo babar\xce\xb1 (esc) |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
71 |
- l\xce\xb5\xce\xb5t (esc) |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
72 |
+ babar\xce\xb1 (esc) |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
73 |
|
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
74 |
ERROR: test-failure-unicode.t output changed |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
75 |
! |
21738
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
76 |
Failed test-failure.t: output changed |
24500
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
77 |
Failed test-failure-unicode.t: output changed |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
78 |
# Ran 3 tests, 0 skipped, 0 warned, 2 failed. |
21738
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
79 |
python hash seed: * (glob) |
7ec3b32b98bb
test-run-tests.t: test running a failing test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21734
diff
changeset
|
80 |
[1] |
24500
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
81 |
|
22044
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
82 |
test --xunit support |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
83 |
$ rt --xunit=xunit.xml |
22044
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
84 |
|
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
85 |
--- $TESTTMP/test-failure.t |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
86 |
+++ $TESTTMP/test-failure.t.err |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
87 |
@@ -1,4 +1,4 @@ |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
88 |
$ echo babar |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
89 |
- rataxes |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
90 |
+ babar |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
91 |
This is a noop statement so that |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
92 |
this test is still more bytes than success. |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
93 |
|
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
94 |
ERROR: test-failure.t output changed |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
95 |
!. |
24500
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
96 |
--- $TESTTMP/test-failure-unicode.t |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
97 |
+++ $TESTTMP/test-failure-unicode.t.err |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
98 |
@@ -1,2 +1,2 @@ |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
99 |
$ echo babar\xce\xb1 (esc) |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
100 |
- l\xce\xb5\xce\xb5t (esc) |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
101 |
+ babar\xce\xb1 (esc) |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
102 |
|
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
103 |
ERROR: test-failure-unicode.t output changed |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
104 |
! |
22044
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
105 |
Failed test-failure.t: output changed |
24500
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
106 |
Failed test-failure-unicode.t: output changed |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
107 |
# Ran 3 tests, 0 skipped, 0 warned, 2 failed. |
22044
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
108 |
python hash seed: * (glob) |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
109 |
[1] |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
110 |
$ cat xunit.xml |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
111 |
<?xml version="1.0" encoding="utf-8"?> |
24500
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
112 |
<testsuite errors="0" failures="2" name="run-tests" skipped="0" tests="3"> |
22044
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
113 |
<testcase name="test-success.t" time="*"/> (glob) |
24500
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
114 |
<testcase name="test-failure-unicode.t" time="*"> (glob) |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
115 |
<![CDATA[--- $TESTTMP/test-failure-unicode.t |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
116 |
+++ $TESTTMP/test-failure-unicode.t.err |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
117 |
@@ -1,2 +1,2 @@ |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
118 |
$ echo babar\xce\xb1 (esc) |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
119 |
- l\xce\xb5\xce\xb5t (esc) |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
120 |
+ babar\xce\xb1 (esc) |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
121 |
]]> </testcase> |
22044
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
122 |
<testcase name="test-failure.t" time="*"> (glob) |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
123 |
<![CDATA[--- $TESTTMP/test-failure.t |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
124 |
+++ $TESTTMP/test-failure.t.err |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
125 |
@@ -1,4 +1,4 @@ |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
126 |
$ echo babar |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
127 |
- rataxes |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
128 |
+ babar |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
129 |
This is a noop statement so that |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
130 |
this test is still more bytes than success. |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
131 |
]]> </testcase> |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
132 |
</testsuite> |
21741
02cd29156d5d
test-run-tests.t: tests the --retest option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21738
diff
changeset
|
133 |
|
24500
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
134 |
$ rm test-failure-unicode.t |
7b0a20cd8c95
run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23935
diff
changeset
|
135 |
|
21741
02cd29156d5d
test-run-tests.t: tests the --retest option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21738
diff
changeset
|
136 |
test for --retest |
02cd29156d5d
test-run-tests.t: tests the --retest option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21738
diff
changeset
|
137 |
==================== |
02cd29156d5d
test-run-tests.t: tests the --retest option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21738
diff
changeset
|
138 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
139 |
$ rt --retest |
21741
02cd29156d5d
test-run-tests.t: tests the --retest option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21738
diff
changeset
|
140 |
|
23348
bbe56e07e07a
tests: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
23245
diff
changeset
|
141 |
--- $TESTTMP/test-failure.t |
bbe56e07e07a
tests: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
23245
diff
changeset
|
142 |
+++ $TESTTMP/test-failure.t.err |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
143 |
@@ -1,4 +1,4 @@ |
21741
02cd29156d5d
test-run-tests.t: tests the --retest option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21738
diff
changeset
|
144 |
$ echo babar |
02cd29156d5d
test-run-tests.t: tests the --retest option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21738
diff
changeset
|
145 |
- rataxes |
02cd29156d5d
test-run-tests.t: tests the --retest option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21738
diff
changeset
|
146 |
+ babar |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
147 |
This is a noop statement so that |
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
148 |
this test is still more bytes than success. |
21741
02cd29156d5d
test-run-tests.t: tests the --retest option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21738
diff
changeset
|
149 |
|
02cd29156d5d
test-run-tests.t: tests the --retest option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21738
diff
changeset
|
150 |
ERROR: test-failure.t output changed |
02cd29156d5d
test-run-tests.t: tests the --retest option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21738
diff
changeset
|
151 |
! |
02cd29156d5d
test-run-tests.t: tests the --retest option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21738
diff
changeset
|
152 |
Failed test-failure.t: output changed |
21997
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
153 |
# Ran 2 tests, 1 skipped, 0 warned, 1 failed. |
21741
02cd29156d5d
test-run-tests.t: tests the --retest option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21738
diff
changeset
|
154 |
python hash seed: * (glob) |
02cd29156d5d
test-run-tests.t: tests the --retest option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21738
diff
changeset
|
155 |
[1] |
21742
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
156 |
|
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
157 |
Selecting Tests To Run |
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
158 |
====================== |
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
159 |
|
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
160 |
successful |
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
161 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
162 |
$ rt test-success.t |
21742
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
163 |
. |
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
164 |
# Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
165 |
|
21997
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
166 |
success w/ keyword |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
167 |
$ rt -k xyzzy |
22107
3b5cf39ffcc4
run-tests: don't show 'i' for tests that don't match a keyword
Matt Mackall <mpm@selenic.com>
parents:
22045
diff
changeset
|
168 |
. |
3b5cf39ffcc4
run-tests: don't show 'i' for tests that don't match a keyword
Matt Mackall <mpm@selenic.com>
parents:
22045
diff
changeset
|
169 |
# Ran 2 tests, 1 skipped, 0 warned, 0 failed. |
21997
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
170 |
|
21742
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
171 |
failed |
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
172 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
173 |
$ rt test-failure.t |
21742
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
174 |
|
23348
bbe56e07e07a
tests: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
23245
diff
changeset
|
175 |
--- $TESTTMP/test-failure.t |
bbe56e07e07a
tests: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
23245
diff
changeset
|
176 |
+++ $TESTTMP/test-failure.t.err |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
177 |
@@ -1,4 +1,4 @@ |
21742
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
178 |
$ echo babar |
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
179 |
- rataxes |
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
180 |
+ babar |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
181 |
This is a noop statement so that |
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
182 |
this test is still more bytes than success. |
21742
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
183 |
|
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
184 |
ERROR: test-failure.t output changed |
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
185 |
! |
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
186 |
Failed test-failure.t: output changed |
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
187 |
# Ran 1 tests, 0 skipped, 0 warned, 1 failed. |
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
188 |
python hash seed: * (glob) |
66f91859822b
test-run-tests.t: test selection of testfile from the command line
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21741
diff
changeset
|
189 |
[1] |
21743
d72bea858cbd
test-run-tests.t: test --debug option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21742
diff
changeset
|
190 |
|
21997
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
191 |
failure w/ keyword |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
192 |
$ rt -k rataxes |
22107
3b5cf39ffcc4
run-tests: don't show 'i' for tests that don't match a keyword
Matt Mackall <mpm@selenic.com>
parents:
22045
diff
changeset
|
193 |
|
21997
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
194 |
--- $TESTTMP/test-failure.t |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
195 |
+++ $TESTTMP/test-failure.t.err |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
196 |
@@ -1,4 +1,4 @@ |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
197 |
$ echo babar |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
198 |
- rataxes |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
199 |
+ babar |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
200 |
This is a noop statement so that |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
201 |
this test is still more bytes than success. |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
202 |
|
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
203 |
ERROR: test-failure.t output changed |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
204 |
! |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
205 |
Failed test-failure.t: output changed |
22107
3b5cf39ffcc4
run-tests: don't show 'i' for tests that don't match a keyword
Matt Mackall <mpm@selenic.com>
parents:
22045
diff
changeset
|
206 |
# Ran 2 tests, 1 skipped, 0 warned, 1 failed. |
21997
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
207 |
python hash seed: * (glob) |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
208 |
[1] |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
209 |
|
22840
ba5c635921e1
test-run-tests: add a test for detection of failure to start a server
Augie Fackler <raf@durin42.com>
parents:
22838
diff
changeset
|
210 |
Verify that when a process fails to start we show a useful message |
ba5c635921e1
test-run-tests: add a test for detection of failure to start a server
Augie Fackler <raf@durin42.com>
parents:
22838
diff
changeset
|
211 |
================================================================== |
ba5c635921e1
test-run-tests: add a test for detection of failure to start a server
Augie Fackler <raf@durin42.com>
parents:
22838
diff
changeset
|
212 |
|
ba5c635921e1
test-run-tests: add a test for detection of failure to start a server
Augie Fackler <raf@durin42.com>
parents:
22838
diff
changeset
|
213 |
$ cat > test-serve-fail.t <<EOF |
ba5c635921e1
test-run-tests: add a test for detection of failure to start a server
Augie Fackler <raf@durin42.com>
parents:
22838
diff
changeset
|
214 |
> $ echo 'abort: child process failed to start blah' |
ba5c635921e1
test-run-tests: add a test for detection of failure to start a server
Augie Fackler <raf@durin42.com>
parents:
22838
diff
changeset
|
215 |
> EOF |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
216 |
$ rt test-serve-fail.t |
22840
ba5c635921e1
test-run-tests: add a test for detection of failure to start a server
Augie Fackler <raf@durin42.com>
parents:
22838
diff
changeset
|
217 |
|
ba5c635921e1
test-run-tests: add a test for detection of failure to start a server
Augie Fackler <raf@durin42.com>
parents:
22838
diff
changeset
|
218 |
ERROR: test-serve-fail.t output changed |
ba5c635921e1
test-run-tests: add a test for detection of failure to start a server
Augie Fackler <raf@durin42.com>
parents:
22838
diff
changeset
|
219 |
! |
ba5c635921e1
test-run-tests: add a test for detection of failure to start a server
Augie Fackler <raf@durin42.com>
parents:
22838
diff
changeset
|
220 |
Failed test-serve-fail.t: server failed to start (HGPORT=*) (glob) |
27567
54bc0e884385
run-tests: avoid double counting server fails
timeless <timeless@mozdev.org>
parents:
27564
diff
changeset
|
221 |
# Ran 1 tests, 0 skipped, 0 warned, 1 failed. |
22840
ba5c635921e1
test-run-tests: add a test for detection of failure to start a server
Augie Fackler <raf@durin42.com>
parents:
22838
diff
changeset
|
222 |
python hash seed: * (glob) |
ba5c635921e1
test-run-tests: add a test for detection of failure to start a server
Augie Fackler <raf@durin42.com>
parents:
22838
diff
changeset
|
223 |
[1] |
ba5c635921e1
test-run-tests: add a test for detection of failure to start a server
Augie Fackler <raf@durin42.com>
parents:
22838
diff
changeset
|
224 |
$ rm test-serve-fail.t |
ba5c635921e1
test-run-tests: add a test for detection of failure to start a server
Augie Fackler <raf@durin42.com>
parents:
22838
diff
changeset
|
225 |
|
27602
67aa88e00fc7
run-tests: fix get port to try differing ports
timeless <timeless@mozdev.org>
parents:
27567
diff
changeset
|
226 |
Verify that we can try other ports |
67aa88e00fc7
run-tests: fix get port to try differing ports
timeless <timeless@mozdev.org>
parents:
27567
diff
changeset
|
227 |
=================================== |
67aa88e00fc7
run-tests: fix get port to try differing ports
timeless <timeless@mozdev.org>
parents:
27567
diff
changeset
|
228 |
$ hg init inuse |
67aa88e00fc7
run-tests: fix get port to try differing ports
timeless <timeless@mozdev.org>
parents:
27567
diff
changeset
|
229 |
$ hg serve -R inuse -p $HGPORT -d --pid-file=blocks.pid |
67aa88e00fc7
run-tests: fix get port to try differing ports
timeless <timeless@mozdev.org>
parents:
27567
diff
changeset
|
230 |
$ cat blocks.pid >> $DAEMON_PIDS |
67aa88e00fc7
run-tests: fix get port to try differing ports
timeless <timeless@mozdev.org>
parents:
27567
diff
changeset
|
231 |
$ cat > test-serve-inuse.t <<EOF |
67aa88e00fc7
run-tests: fix get port to try differing ports
timeless <timeless@mozdev.org>
parents:
27567
diff
changeset
|
232 |
> $ hg serve -R `pwd`/inuse -p \$HGPORT -d --pid-file=hg.pid |
67aa88e00fc7
run-tests: fix get port to try differing ports
timeless <timeless@mozdev.org>
parents:
27567
diff
changeset
|
233 |
> $ cat hg.pid >> \$DAEMON_PIDS |
67aa88e00fc7
run-tests: fix get port to try differing ports
timeless <timeless@mozdev.org>
parents:
27567
diff
changeset
|
234 |
> EOF |
67aa88e00fc7
run-tests: fix get port to try differing ports
timeless <timeless@mozdev.org>
parents:
27567
diff
changeset
|
235 |
$ rt test-serve-inuse.t |
67aa88e00fc7
run-tests: fix get port to try differing ports
timeless <timeless@mozdev.org>
parents:
27567
diff
changeset
|
236 |
. |
67aa88e00fc7
run-tests: fix get port to try differing ports
timeless <timeless@mozdev.org>
parents:
27567
diff
changeset
|
237 |
# Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
67aa88e00fc7
run-tests: fix get port to try differing ports
timeless <timeless@mozdev.org>
parents:
27567
diff
changeset
|
238 |
$ rm test-serve-inuse.t |
67aa88e00fc7
run-tests: fix get port to try differing ports
timeless <timeless@mozdev.org>
parents:
27567
diff
changeset
|
239 |
|
21743
d72bea858cbd
test-run-tests.t: test --debug option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21742
diff
changeset
|
240 |
Running In Debug Mode |
d72bea858cbd
test-run-tests.t: test --debug option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21742
diff
changeset
|
241 |
====================== |
d72bea858cbd
test-run-tests.t: test --debug option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21742
diff
changeset
|
242 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
243 |
$ rt --debug 2>&1 | grep -v pwd |
23676
e8b09f920fe6
tests: adapt glob pattern to fix test with NetBSD's sh(1) (issue4484)
Thomas Klausner <tk@giga.or.at>
parents:
23348
diff
changeset
|
244 |
+ echo *SALT* 0 0 (glob) |
e8b09f920fe6
tests: adapt glob pattern to fix test with NetBSD's sh(1) (issue4484)
Thomas Klausner <tk@giga.or.at>
parents:
23348
diff
changeset
|
245 |
*SALT* 0 0 (glob) |
21743
d72bea858cbd
test-run-tests.t: test --debug option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21742
diff
changeset
|
246 |
+ echo babar |
d72bea858cbd
test-run-tests.t: test --debug option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21742
diff
changeset
|
247 |
babar |
23676
e8b09f920fe6
tests: adapt glob pattern to fix test with NetBSD's sh(1) (issue4484)
Thomas Klausner <tk@giga.or.at>
parents:
23348
diff
changeset
|
248 |
+ echo *SALT* 4 0 (glob) |
e8b09f920fe6
tests: adapt glob pattern to fix test with NetBSD's sh(1) (issue4484)
Thomas Klausner <tk@giga.or.at>
parents:
23348
diff
changeset
|
249 |
*SALT* 4 0 (glob) |
27509
6ff90d618d72
test-run-tests: glob away a --debug run difference on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
27395
diff
changeset
|
250 |
*+ echo *SALT* 0 0 (glob) |
23676
e8b09f920fe6
tests: adapt glob pattern to fix test with NetBSD's sh(1) (issue4484)
Thomas Klausner <tk@giga.or.at>
parents:
23348
diff
changeset
|
251 |
*SALT* 0 0 (glob) |
21743
d72bea858cbd
test-run-tests.t: test --debug option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21742
diff
changeset
|
252 |
+ echo babar |
d72bea858cbd
test-run-tests.t: test --debug option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21742
diff
changeset
|
253 |
babar |
23676
e8b09f920fe6
tests: adapt glob pattern to fix test with NetBSD's sh(1) (issue4484)
Thomas Klausner <tk@giga.or.at>
parents:
23348
diff
changeset
|
254 |
+ echo *SALT* 2 0 (glob) |
e8b09f920fe6
tests: adapt glob pattern to fix test with NetBSD's sh(1) (issue4484)
Thomas Klausner <tk@giga.or.at>
parents:
23348
diff
changeset
|
255 |
*SALT* 2 0 (glob) |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
256 |
+ echo xyzzy |
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
257 |
xyzzy |
25388
6025cac3d02f
tests: add (?) flag for optional lines
Matt Mackall <mpm@selenic.com>
parents:
25098
diff
changeset
|
258 |
+ echo *SALT* 6 0 (glob) |
6025cac3d02f
tests: add (?) flag for optional lines
Matt Mackall <mpm@selenic.com>
parents:
25098
diff
changeset
|
259 |
*SALT* 6 0 (glob) |
21743
d72bea858cbd
test-run-tests.t: test --debug option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21742
diff
changeset
|
260 |
. |
d72bea858cbd
test-run-tests.t: test --debug option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21742
diff
changeset
|
261 |
# Ran 2 tests, 0 skipped, 0 warned, 0 failed. |
21744
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
262 |
|
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
263 |
Parallel runs |
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
264 |
============== |
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
265 |
|
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
266 |
(duplicate the failing test to get predictable output) |
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
267 |
$ cp test-failure.t test-failure-copy.t |
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
268 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
269 |
$ rt --jobs 2 test-failure*.t -n |
23107
5459b30aa498
tests: silence output race in test-run-tests.t
Matt Mackall <mpm@selenic.com>
parents:
22840
diff
changeset
|
270 |
!! |
21744
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
271 |
Failed test-failure*.t: output changed (glob) |
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
272 |
Failed test-failure*.t: output changed (glob) |
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
273 |
# Ran 2 tests, 0 skipped, 0 warned, 2 failed. |
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
274 |
python hash seed: * (glob) |
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
275 |
[1] |
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
276 |
|
22838
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
277 |
failures in parallel with --first should only print one failure |
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
278 |
>>> f = open('test-nothing.t', 'w') |
25054
af5a778f8e2e
test-run-tests.t: work around file.write() returning an int
Augie Fackler <augie@google.com>
parents:
24990
diff
changeset
|
279 |
>>> f.write('foo\n' * 1024) and None |
af5a778f8e2e
test-run-tests.t: work around file.write() returning an int
Augie Fackler <augie@google.com>
parents:
24990
diff
changeset
|
280 |
>>> f.write(' $ sleep 1') and None |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
281 |
$ rt --jobs 2 --first |
22838
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
282 |
|
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
283 |
--- $TESTTMP/test-failure*.t (glob) |
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
284 |
+++ $TESTTMP/test-failure*.t.err (glob) |
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
285 |
@@ -1,4 +1,4 @@ |
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
286 |
$ echo babar |
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
287 |
- rataxes |
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
288 |
+ babar |
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
289 |
This is a noop statement so that |
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
290 |
this test is still more bytes than success. |
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
291 |
|
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
292 |
Failed test-failure*.t: output changed (glob) |
24507
a0668a587c04
run-tests: wait for test threads after first error
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24500
diff
changeset
|
293 |
Failed test-nothing.t: output changed |
a0668a587c04
run-tests: wait for test threads after first error
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24500
diff
changeset
|
294 |
# Ran 2 tests, 0 skipped, 0 warned, 2 failed. |
22838
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
295 |
python hash seed: * (glob) |
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
296 |
[1] |
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
297 |
|
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
298 |
|
21744
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
299 |
(delete the duplicated test file) |
22838
9a20f53e436f
run-tests: handle --jobs and --first gracefully
Augie Fackler <raf@durin42.com>
parents:
22579
diff
changeset
|
300 |
$ rm test-failure-copy.t test-nothing.t |
21744
395e29928db2
test-run-tests.t: tests --jobs option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21743
diff
changeset
|
301 |
|
21755
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
302 |
|
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
303 |
Interactive run |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
304 |
=============== |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
305 |
|
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
306 |
(backup the failing test) |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
307 |
$ cp test-failure.t backup |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
308 |
|
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
309 |
Refuse the fix |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
310 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
311 |
$ echo 'n' | rt -i |
21755
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
312 |
|
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
313 |
--- $TESTTMP/test-failure.t |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
314 |
+++ $TESTTMP/test-failure.t.err |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
315 |
@@ -1,4 +1,4 @@ |
21755
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
316 |
$ echo babar |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
317 |
- rataxes |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
318 |
+ babar |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
319 |
This is a noop statement so that |
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
320 |
this test is still more bytes than success. |
21763
84cd5ee787ed
run-tests: hold iolock across diff/prompt when interactive
Matt Mackall <mpm@selenic.com>
parents:
21756
diff
changeset
|
321 |
Accept this change? [n] |
21755
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
322 |
ERROR: test-failure.t output changed |
21763
84cd5ee787ed
run-tests: hold iolock across diff/prompt when interactive
Matt Mackall <mpm@selenic.com>
parents:
21756
diff
changeset
|
323 |
!. |
21755
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
324 |
Failed test-failure.t: output changed |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
325 |
# Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
326 |
python hash seed: * (glob) |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
327 |
[1] |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
328 |
|
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
329 |
$ cat test-failure.t |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
330 |
$ echo babar |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
331 |
rataxes |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
332 |
This is a noop statement so that |
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
333 |
this test is still more bytes than success. |
21755
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
334 |
|
22361
eb6adf750954
run-tests: make --interactive work with --view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22292
diff
changeset
|
335 |
Interactive with custom view |
eb6adf750954
run-tests: make --interactive work with --view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22292
diff
changeset
|
336 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
337 |
$ echo 'n' | rt -i --view echo |
23348
bbe56e07e07a
tests: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
23245
diff
changeset
|
338 |
$TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) |
22361
eb6adf750954
run-tests: make --interactive work with --view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22292
diff
changeset
|
339 |
Accept this change? [n]* (glob) |
eb6adf750954
run-tests: make --interactive work with --view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22292
diff
changeset
|
340 |
ERROR: test-failure.t output changed |
eb6adf750954
run-tests: make --interactive work with --view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22292
diff
changeset
|
341 |
!. |
eb6adf750954
run-tests: make --interactive work with --view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22292
diff
changeset
|
342 |
Failed test-failure.t: output changed |
eb6adf750954
run-tests: make --interactive work with --view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22292
diff
changeset
|
343 |
# Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
eb6adf750954
run-tests: make --interactive work with --view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22292
diff
changeset
|
344 |
python hash seed: * (glob) |
eb6adf750954
run-tests: make --interactive work with --view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22292
diff
changeset
|
345 |
[1] |
eb6adf750954
run-tests: make --interactive work with --view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
22292
diff
changeset
|
346 |
|
22108
ccae572c5d09
test-run-tests: test --view
Matt Mackall <mpm@selenic.com>
parents:
22107
diff
changeset
|
347 |
View the fix |
ccae572c5d09
test-run-tests: test --view
Matt Mackall <mpm@selenic.com>
parents:
22107
diff
changeset
|
348 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
349 |
$ echo 'y' | rt --view echo |
23348
bbe56e07e07a
tests: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
23245
diff
changeset
|
350 |
$TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) |
22108
ccae572c5d09
test-run-tests: test --view
Matt Mackall <mpm@selenic.com>
parents:
22107
diff
changeset
|
351 |
|
ccae572c5d09
test-run-tests: test --view
Matt Mackall <mpm@selenic.com>
parents:
22107
diff
changeset
|
352 |
ERROR: test-failure.t output changed |
ccae572c5d09
test-run-tests: test --view
Matt Mackall <mpm@selenic.com>
parents:
22107
diff
changeset
|
353 |
!. |
ccae572c5d09
test-run-tests: test --view
Matt Mackall <mpm@selenic.com>
parents:
22107
diff
changeset
|
354 |
Failed test-failure.t: output changed |
ccae572c5d09
test-run-tests: test --view
Matt Mackall <mpm@selenic.com>
parents:
22107
diff
changeset
|
355 |
# Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
ccae572c5d09
test-run-tests: test --view
Matt Mackall <mpm@selenic.com>
parents:
22107
diff
changeset
|
356 |
python hash seed: * (glob) |
ccae572c5d09
test-run-tests: test --view
Matt Mackall <mpm@selenic.com>
parents:
22107
diff
changeset
|
357 |
[1] |
21755
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
358 |
|
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
359 |
Accept the fix |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
360 |
|
23728
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
361 |
$ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t |
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
362 |
$ echo " saved backup bundle to \$TESTTMP/foo.hg" >> test-failure.t |
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
363 |
$ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t |
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
364 |
$ echo " saved backup bundle to \$TESTTMP/foo.hg (glob)" >> test-failure.t |
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
365 |
$ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t |
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
366 |
$ echo " saved backup bundle to \$TESTTMP/*.hg (glob)" >> test-failure.t |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
367 |
$ echo 'y' | rt -i 2>&1 |
21755
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
368 |
|
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
369 |
--- $TESTTMP/test-failure.t |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
370 |
+++ $TESTTMP/test-failure.t.err |
23728
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
371 |
@@ -1,9 +1,9 @@ |
21755
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
372 |
$ echo babar |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
373 |
- rataxes |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
374 |
+ babar |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
375 |
This is a noop statement so that |
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
376 |
this test is still more bytes than success. |
23728
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
377 |
$ echo 'saved backup bundle to $TESTTMP/foo.hg' |
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
378 |
- saved backup bundle to $TESTTMP/foo.hg |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
379 |
+ saved backup bundle to $TESTTMP/foo.hg* (glob) |
23728
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
380 |
$ echo 'saved backup bundle to $TESTTMP/foo.hg' |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
381 |
saved backup bundle to $TESTTMP/foo.hg* (glob) |
23728
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
382 |
$ echo 'saved backup bundle to $TESTTMP/foo.hg' |
21755
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
383 |
Accept this change? [n] .. |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
384 |
# Ran 2 tests, 0 skipped, 0 warned, 0 failed. |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
385 |
|
23728
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
386 |
$ sed -e 's,(glob)$,&<,g' test-failure.t |
21755
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
387 |
$ echo babar |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
388 |
babar |
21995
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
389 |
This is a noop statement so that |
20bfcb484554
test-run-tests.t: add extra data to tests for keyword tests
Augie Fackler <raf@durin42.com>
parents:
21977
diff
changeset
|
390 |
this test is still more bytes than success. |
23728
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
391 |
$ echo 'saved backup bundle to $TESTTMP/foo.hg' |
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
392 |
saved backup bundle to $TESTTMP/foo.hg (glob)< |
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
393 |
$ echo 'saved backup bundle to $TESTTMP/foo.hg' |
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
394 |
saved backup bundle to $TESTTMP/foo.hg (glob)< |
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
395 |
$ echo 'saved backup bundle to $TESTTMP/foo.hg' |
31d3f973d079
run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich <madski@unity3d.com>
parents:
23676
diff
changeset
|
396 |
saved backup bundle to $TESTTMP/*.hg (glob)< |
21755
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
397 |
|
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
398 |
(reinstall) |
9e9288b9463a
test-run-tests.t: test the --interactive option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21744
diff
changeset
|
399 |
$ mv backup test-failure.t |
21756
f5fd1580a649
test-run-tests.t: test the --nodiff option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21755
diff
changeset
|
400 |
|
f5fd1580a649
test-run-tests.t: test the --nodiff option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21755
diff
changeset
|
401 |
No Diff |
f5fd1580a649
test-run-tests.t: test the --nodiff option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21755
diff
changeset
|
402 |
=============== |
f5fd1580a649
test-run-tests.t: test the --nodiff option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21755
diff
changeset
|
403 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
404 |
$ rt --nodiff |
21756
f5fd1580a649
test-run-tests.t: test the --nodiff option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21755
diff
changeset
|
405 |
!. |
f5fd1580a649
test-run-tests.t: test the --nodiff option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21755
diff
changeset
|
406 |
Failed test-failure.t: output changed |
f5fd1580a649
test-run-tests.t: test the --nodiff option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21755
diff
changeset
|
407 |
# Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
f5fd1580a649
test-run-tests.t: test the --nodiff option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21755
diff
changeset
|
408 |
python hash seed: * (glob) |
f5fd1580a649
test-run-tests.t: test the --nodiff option
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21755
diff
changeset
|
409 |
[1] |
21977
4ca4e1572022
run-tests: '--time' option provide more details to Linux users
anuraggoel <anurag.dsps@gmail.com>
parents:
21926
diff
changeset
|
410 |
|
26422
41436beaf463
run-tests: report paths saved by --keep-tmpdir
timeless@mozdev.org
parents:
26158
diff
changeset
|
411 |
test --tmpdir support |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
412 |
$ rt --tmpdir=$TESTTMP/keep test-success.t |
26422
41436beaf463
run-tests: report paths saved by --keep-tmpdir
timeless@mozdev.org
parents:
26158
diff
changeset
|
413 |
|
26432
39577d4520ab
test-run-tests: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
26422
diff
changeset
|
414 |
Keeping testtmp dir: $TESTTMP/keep/child1/test-success.t (glob) |
39577d4520ab
test-run-tests: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
26422
diff
changeset
|
415 |
Keeping threadtmp dir: $TESTTMP/keep/child1 (glob) |
26422
41436beaf463
run-tests: report paths saved by --keep-tmpdir
timeless@mozdev.org
parents:
26158
diff
changeset
|
416 |
. |
41436beaf463
run-tests: report paths saved by --keep-tmpdir
timeless@mozdev.org
parents:
26158
diff
changeset
|
417 |
# Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
41436beaf463
run-tests: report paths saved by --keep-tmpdir
timeless@mozdev.org
parents:
26158
diff
changeset
|
418 |
|
27141
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
419 |
timeouts |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
420 |
======== |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
421 |
$ cat > test-timeout.t <<EOF |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
422 |
> $ sleep 2 |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
423 |
> $ echo pass |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
424 |
> pass |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
425 |
> EOF |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
426 |
> echo '#require slow' > test-slow-timeout.t |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
427 |
> cat test-timeout.t >> test-slow-timeout.t |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
428 |
$ rt --timeout=1 --slowtimeout=3 test-timeout.t test-slow-timeout.t |
27393
a40b623e6380
run-tests: report timeouts in a less alarming fashion
Matt Mackall <mpm@selenic.com>
parents:
27141
diff
changeset
|
429 |
st |
27564
80b53082a353
run-tests: report missing feature for skipped tests
timeless <timeless@mozdev.org>
parents:
27509
diff
changeset
|
430 |
Skipped test-slow-timeout.t: missing feature: allow slow tests |
27141
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
431 |
Failed test-timeout.t: timed out |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
432 |
# Ran 1 tests, 1 skipped, 0 warned, 1 failed. |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
433 |
python hash seed: * (glob) |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
434 |
[1] |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
435 |
$ rt --timeout=1 --slowtimeout=3 \ |
27141
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
436 |
> test-timeout.t test-slow-timeout.t --allow-slow-tests |
27393
a40b623e6380
run-tests: report timeouts in a less alarming fashion
Matt Mackall <mpm@selenic.com>
parents:
27141
diff
changeset
|
437 |
.t |
27141
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
438 |
Failed test-timeout.t: timed out |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
439 |
# Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
440 |
python hash seed: * (glob) |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
441 |
[1] |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
442 |
$ rm test-timeout.t test-slow-timeout.t |
a4e3dec3010e
run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org>
parents:
27057
diff
changeset
|
443 |
|
21977
4ca4e1572022
run-tests: '--time' option provide more details to Linux users
anuraggoel <anurag.dsps@gmail.com>
parents:
21926
diff
changeset
|
444 |
test for --time |
4ca4e1572022
run-tests: '--time' option provide more details to Linux users
anuraggoel <anurag.dsps@gmail.com>
parents:
21926
diff
changeset
|
445 |
================== |
4ca4e1572022
run-tests: '--time' option provide more details to Linux users
anuraggoel <anurag.dsps@gmail.com>
parents:
21926
diff
changeset
|
446 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
447 |
$ rt test-success.t --time |
21977
4ca4e1572022
run-tests: '--time' option provide more details to Linux users
anuraggoel <anurag.dsps@gmail.com>
parents:
21926
diff
changeset
|
448 |
. |
4ca4e1572022
run-tests: '--time' option provide more details to Linux users
anuraggoel <anurag.dsps@gmail.com>
parents:
21926
diff
changeset
|
449 |
# Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
4ca4e1572022
run-tests: '--time' option provide more details to Linux users
anuraggoel <anurag.dsps@gmail.com>
parents:
21926
diff
changeset
|
450 |
# Producing time report |
25098
bf84ab53c2fd
run-tests: include 'start' and 'end' in --time output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25097
diff
changeset
|
451 |
start end cuser csys real Test |
bf84ab53c2fd
run-tests: include 'start' and 'end' in --time output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25097
diff
changeset
|
452 |
\s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) |
21977
4ca4e1572022
run-tests: '--time' option provide more details to Linux users
anuraggoel <anurag.dsps@gmail.com>
parents:
21926
diff
changeset
|
453 |
|
4ca4e1572022
run-tests: '--time' option provide more details to Linux users
anuraggoel <anurag.dsps@gmail.com>
parents:
21926
diff
changeset
|
454 |
test for --time with --job enabled |
4ca4e1572022
run-tests: '--time' option provide more details to Linux users
anuraggoel <anurag.dsps@gmail.com>
parents:
21926
diff
changeset
|
455 |
==================================== |
4ca4e1572022
run-tests: '--time' option provide more details to Linux users
anuraggoel <anurag.dsps@gmail.com>
parents:
21926
diff
changeset
|
456 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
457 |
$ rt test-success.t --time --jobs 2 |
21977
4ca4e1572022
run-tests: '--time' option provide more details to Linux users
anuraggoel <anurag.dsps@gmail.com>
parents:
21926
diff
changeset
|
458 |
. |
4ca4e1572022
run-tests: '--time' option provide more details to Linux users
anuraggoel <anurag.dsps@gmail.com>
parents:
21926
diff
changeset
|
459 |
# Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
4ca4e1572022
run-tests: '--time' option provide more details to Linux users
anuraggoel <anurag.dsps@gmail.com>
parents:
21926
diff
changeset
|
460 |
# Producing time report |
25098
bf84ab53c2fd
run-tests: include 'start' and 'end' in --time output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25097
diff
changeset
|
461 |
start end cuser csys real Test |
bf84ab53c2fd
run-tests: include 'start' and 'end' in --time output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25097
diff
changeset
|
462 |
\s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) |
21996
947553944e92
test-run-tests.t: add tests for skips
Augie Fackler <raf@durin42.com>
parents:
21995
diff
changeset
|
463 |
|
947553944e92
test-run-tests.t: add tests for skips
Augie Fackler <raf@durin42.com>
parents:
21995
diff
changeset
|
464 |
Skips |
947553944e92
test-run-tests.t: add tests for skips
Augie Fackler <raf@durin42.com>
parents:
21995
diff
changeset
|
465 |
================ |
947553944e92
test-run-tests.t: add tests for skips
Augie Fackler <raf@durin42.com>
parents:
21995
diff
changeset
|
466 |
$ cat > test-skip.t <<EOF |
947553944e92
test-run-tests.t: add tests for skips
Augie Fackler <raf@durin42.com>
parents:
21995
diff
changeset
|
467 |
> $ echo xyzzy |
22045
769198c6a62d
run-tests: add #require to abort full test
Matt Mackall <mpm@selenic.com>
parents:
22044
diff
changeset
|
468 |
> #require false |
21996
947553944e92
test-run-tests.t: add tests for skips
Augie Fackler <raf@durin42.com>
parents:
21995
diff
changeset
|
469 |
> EOF |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
470 |
$ rt --nodiff |
21996
947553944e92
test-run-tests.t: add tests for skips
Augie Fackler <raf@durin42.com>
parents:
21995
diff
changeset
|
471 |
!.s |
27564
80b53082a353
run-tests: report missing feature for skipped tests
timeless <timeless@mozdev.org>
parents:
27509
diff
changeset
|
472 |
Skipped test-skip.t: missing feature: nail clipper |
21996
947553944e92
test-run-tests.t: add tests for skips
Augie Fackler <raf@durin42.com>
parents:
21995
diff
changeset
|
473 |
Failed test-failure.t: output changed |
947553944e92
test-run-tests.t: add tests for skips
Augie Fackler <raf@durin42.com>
parents:
21995
diff
changeset
|
474 |
# Ran 2 tests, 1 skipped, 0 warned, 1 failed. |
947553944e92
test-run-tests.t: add tests for skips
Augie Fackler <raf@durin42.com>
parents:
21995
diff
changeset
|
475 |
python hash seed: * (glob) |
947553944e92
test-run-tests.t: add tests for skips
Augie Fackler <raf@durin42.com>
parents:
21995
diff
changeset
|
476 |
[1] |
947553944e92
test-run-tests.t: add tests for skips
Augie Fackler <raf@durin42.com>
parents:
21995
diff
changeset
|
477 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
478 |
$ rt --keyword xyzzy |
22107
3b5cf39ffcc4
run-tests: don't show 'i' for tests that don't match a keyword
Matt Mackall <mpm@selenic.com>
parents:
22045
diff
changeset
|
479 |
.s |
27564
80b53082a353
run-tests: report missing feature for skipped tests
timeless <timeless@mozdev.org>
parents:
27509
diff
changeset
|
480 |
Skipped test-skip.t: missing feature: nail clipper |
22107
3b5cf39ffcc4
run-tests: don't show 'i' for tests that don't match a keyword
Matt Mackall <mpm@selenic.com>
parents:
22045
diff
changeset
|
481 |
# Ran 2 tests, 2 skipped, 0 warned, 0 failed. |
21997
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
482 |
|
22044
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
483 |
Skips with xml |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
484 |
$ rt --keyword xyzzy \ |
22044
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
485 |
> --xunit=xunit.xml |
22107
3b5cf39ffcc4
run-tests: don't show 'i' for tests that don't match a keyword
Matt Mackall <mpm@selenic.com>
parents:
22045
diff
changeset
|
486 |
.s |
27564
80b53082a353
run-tests: report missing feature for skipped tests
timeless <timeless@mozdev.org>
parents:
27509
diff
changeset
|
487 |
Skipped test-skip.t: missing feature: nail clipper |
22107
3b5cf39ffcc4
run-tests: don't show 'i' for tests that don't match a keyword
Matt Mackall <mpm@selenic.com>
parents:
22045
diff
changeset
|
488 |
# Ran 2 tests, 2 skipped, 0 warned, 0 failed. |
22044
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
489 |
$ cat xunit.xml |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
490 |
<?xml version="1.0" encoding="utf-8"?> |
22107
3b5cf39ffcc4
run-tests: don't show 'i' for tests that don't match a keyword
Matt Mackall <mpm@selenic.com>
parents:
22045
diff
changeset
|
491 |
<testsuite errors="0" failures="0" name="run-tests" skipped="2" tests="2"> |
22044
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
492 |
<testcase name="test-success.t" time="*"/> (glob) |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
493 |
</testsuite> |
a06172e85fd4
run-tests: add support for xunit test reports
Augie Fackler <raf@durin42.com>
parents:
21997
diff
changeset
|
494 |
|
21997
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
495 |
Missing skips or blacklisted skips don't count as executed: |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
496 |
$ echo test-failure.t > blacklist |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
497 |
$ rt --blacklist=blacklist \ |
21997
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
498 |
> test-failure.t test-bogus.t |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
499 |
ss |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
500 |
Skipped test-bogus.t: Doesn't exist |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
501 |
Skipped test-failure.t: blacklisted |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
502 |
# Ran 0 tests, 2 skipped, 0 warned, 0 failed. |
93c3b3f55d59
run-tests: fix test result counts with --keyword specified or skips occurring
Augie Fackler <raf@durin42.com>
parents:
21996
diff
changeset
|
503 |
|
22579
36a940d82f88
test: protect the run-tests.py --json test behind an hghave rule
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22486
diff
changeset
|
504 |
#if json |
36a940d82f88
test: protect the run-tests.py --json test behind an hghave rule
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22486
diff
changeset
|
505 |
|
22391
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
506 |
test for --json |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
507 |
================== |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
508 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
509 |
$ rt --json |
22391
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
510 |
|
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
511 |
--- $TESTTMP/test-failure.t |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
512 |
+++ $TESTTMP/test-failure.t.err |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
513 |
@@ -1,4 +1,4 @@ |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
514 |
$ echo babar |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
515 |
- rataxes |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
516 |
+ babar |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
517 |
This is a noop statement so that |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
518 |
this test is still more bytes than success. |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
519 |
|
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
520 |
ERROR: test-failure.t output changed |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
521 |
!.s |
27564
80b53082a353
run-tests: report missing feature for skipped tests
timeless <timeless@mozdev.org>
parents:
27509
diff
changeset
|
522 |
Skipped test-skip.t: missing feature: nail clipper |
22391
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
523 |
Failed test-failure.t: output changed |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
524 |
# Ran 2 tests, 1 skipped, 0 warned, 1 failed. |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
525 |
python hash seed: * (glob) |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
526 |
[1] |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
527 |
|
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
528 |
$ cat report.json |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
529 |
testreport ={ |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
530 |
"test-failure.t": [\{] (re) |
23245
d33a90cb2a32
test-run-tests: accept more levels of precision and trailing ws (issue4440)
Augie Fackler <raf@durin42.com>
parents:
23107
diff
changeset
|
531 |
"csys": "\s*[\d\.]{4,5}", ? (re) |
d33a90cb2a32
test-run-tests: accept more levels of precision and trailing ws (issue4440)
Augie Fackler <raf@durin42.com>
parents:
23107
diff
changeset
|
532 |
"cuser": "\s*[\d\.]{4,5}", ? (re) |
25097
a4fce7905721
run-tests: track start and end time of tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25054
diff
changeset
|
533 |
"end": "\s*[\d\.]{4,5}", ? (re) |
23245
d33a90cb2a32
test-run-tests: accept more levels of precision and trailing ws (issue4440)
Augie Fackler <raf@durin42.com>
parents:
23107
diff
changeset
|
534 |
"result": "failure", ? (re) |
25097
a4fce7905721
run-tests: track start and end time of tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25054
diff
changeset
|
535 |
"start": "\s*[\d\.]{4,5}", ? (re) |
23245
d33a90cb2a32
test-run-tests: accept more levels of precision and trailing ws (issue4440)
Augie Fackler <raf@durin42.com>
parents:
23107
diff
changeset
|
536 |
"time": "\s*[\d\.]{4,5}" (re) |
d33a90cb2a32
test-run-tests: accept more levels of precision and trailing ws (issue4440)
Augie Fackler <raf@durin42.com>
parents:
23107
diff
changeset
|
537 |
}, ? (re) |
22391
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
538 |
"test-skip.t": { |
23245
d33a90cb2a32
test-run-tests: accept more levels of precision and trailing ws (issue4440)
Augie Fackler <raf@durin42.com>
parents:
23107
diff
changeset
|
539 |
"csys": "\s*[\d\.]{4,5}", ? (re) |
d33a90cb2a32
test-run-tests: accept more levels of precision and trailing ws (issue4440)
Augie Fackler <raf@durin42.com>
parents:
23107
diff
changeset
|
540 |
"cuser": "\s*[\d\.]{4,5}", ? (re) |
25097
a4fce7905721
run-tests: track start and end time of tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25054
diff
changeset
|
541 |
"end": "\s*[\d\.]{4,5}", ? (re) |
23245
d33a90cb2a32
test-run-tests: accept more levels of precision and trailing ws (issue4440)
Augie Fackler <raf@durin42.com>
parents:
23107
diff
changeset
|
542 |
"result": "skip", ? (re) |
25097
a4fce7905721
run-tests: track start and end time of tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25054
diff
changeset
|
543 |
"start": "\s*[\d\.]{4,5}", ? (re) |
23245
d33a90cb2a32
test-run-tests: accept more levels of precision and trailing ws (issue4440)
Augie Fackler <raf@durin42.com>
parents:
23107
diff
changeset
|
544 |
"time": "\s*[\d\.]{4,5}" (re) |
d33a90cb2a32
test-run-tests: accept more levels of precision and trailing ws (issue4440)
Augie Fackler <raf@durin42.com>
parents:
23107
diff
changeset
|
545 |
}, ? (re) |
22391
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
546 |
"test-success.t": [\{] (re) |
23245
d33a90cb2a32
test-run-tests: accept more levels of precision and trailing ws (issue4440)
Augie Fackler <raf@durin42.com>
parents:
23107
diff
changeset
|
547 |
"csys": "\s*[\d\.]{4,5}", ? (re) |
d33a90cb2a32
test-run-tests: accept more levels of precision and trailing ws (issue4440)
Augie Fackler <raf@durin42.com>
parents:
23107
diff
changeset
|
548 |
"cuser": "\s*[\d\.]{4,5}", ? (re) |
25097
a4fce7905721
run-tests: track start and end time of tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25054
diff
changeset
|
549 |
"end": "\s*[\d\.]{4,5}", ? (re) |
23245
d33a90cb2a32
test-run-tests: accept more levels of precision and trailing ws (issue4440)
Augie Fackler <raf@durin42.com>
parents:
23107
diff
changeset
|
550 |
"result": "success", ? (re) |
25097
a4fce7905721
run-tests: track start and end time of tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25054
diff
changeset
|
551 |
"start": "\s*[\d\.]{4,5}", ? (re) |
23245
d33a90cb2a32
test-run-tests: accept more levels of precision and trailing ws (issue4440)
Augie Fackler <raf@durin42.com>
parents:
23107
diff
changeset
|
552 |
"time": "\s*[\d\.]{4,5}" (re) |
22391
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
553 |
} |
c42e69268f5b
run-tests: added '--json' functionality to store test result in json file
anuraggoel <anurag.dsps@gmail.com>
parents:
22361
diff
changeset
|
554 |
} (no-eol) |
22579
36a940d82f88
test: protect the run-tests.py --json test behind an hghave rule
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22486
diff
changeset
|
555 |
|
24979
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
556 |
Test that failed test accepted through interactive are properly reported: |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
557 |
|
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
558 |
$ cp test-failure.t backup |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
559 |
$ echo y | rt --json -i |
24979
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
560 |
|
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
561 |
--- $TESTTMP/test-failure.t |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
562 |
+++ $TESTTMP/test-failure.t.err |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
563 |
@@ -1,4 +1,4 @@ |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
564 |
$ echo babar |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
565 |
- rataxes |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
566 |
+ babar |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
567 |
This is a noop statement so that |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
568 |
this test is still more bytes than success. |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
569 |
Accept this change? [n] ..s |
27564
80b53082a353
run-tests: report missing feature for skipped tests
timeless <timeless@mozdev.org>
parents:
27509
diff
changeset
|
570 |
Skipped test-skip.t: missing feature: nail clipper |
24979
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
571 |
# Ran 2 tests, 1 skipped, 0 warned, 0 failed. |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
572 |
|
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
573 |
$ cat report.json |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
574 |
testreport ={ |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
575 |
"test-failure.t": [\{] (re) |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
576 |
"csys": "\s*[\d\.]{4,5}", ? (re) |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
577 |
"cuser": "\s*[\d\.]{4,5}", ? (re) |
25097
a4fce7905721
run-tests: track start and end time of tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25054
diff
changeset
|
578 |
"end": "\s*[\d\.]{4,5}", ? (re) |
24979
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
579 |
"result": "success", ? (re) |
25097
a4fce7905721
run-tests: track start and end time of tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25054
diff
changeset
|
580 |
"start": "\s*[\d\.]{4,5}", ? (re) |
24979
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
581 |
"time": "\s*[\d\.]{4,5}" (re) |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
582 |
}, ? (re) |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
583 |
"test-skip.t": { |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
584 |
"csys": "\s*[\d\.]{4,5}", ? (re) |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
585 |
"cuser": "\s*[\d\.]{4,5}", ? (re) |
25097
a4fce7905721
run-tests: track start and end time of tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25054
diff
changeset
|
586 |
"end": "\s*[\d\.]{4,5}", ? (re) |
24979
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
587 |
"result": "skip", ? (re) |
25097
a4fce7905721
run-tests: track start and end time of tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25054
diff
changeset
|
588 |
"start": "\s*[\d\.]{4,5}", ? (re) |
24979
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
589 |
"time": "\s*[\d\.]{4,5}" (re) |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
590 |
}, ? (re) |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
591 |
"test-success.t": [\{] (re) |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
592 |
"csys": "\s*[\d\.]{4,5}", ? (re) |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
593 |
"cuser": "\s*[\d\.]{4,5}", ? (re) |
25097
a4fce7905721
run-tests: track start and end time of tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25054
diff
changeset
|
594 |
"end": "\s*[\d\.]{4,5}", ? (re) |
24979
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
595 |
"result": "success", ? (re) |
25097
a4fce7905721
run-tests: track start and end time of tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25054
diff
changeset
|
596 |
"start": "\s*[\d\.]{4,5}", ? (re) |
24979
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
597 |
"time": "\s*[\d\.]{4,5}" (re) |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
598 |
} |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
599 |
} (no-eol) |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
600 |
$ mv backup test-failure.t |
f44db7343be9
run-test: add a test for json output when -i is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24811
diff
changeset
|
601 |
|
22579
36a940d82f88
test: protect the run-tests.py --json test behind an hghave rule
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22486
diff
changeset
|
602 |
#endif |
24811
a2dcf460e141
run-tests: don't error when glob matched line ends with backslash
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24507
diff
changeset
|
603 |
|
a2dcf460e141
run-tests: don't error when glob matched line ends with backslash
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24507
diff
changeset
|
604 |
backslash on end of line with glob matching is handled properly |
a2dcf460e141
run-tests: don't error when glob matched line ends with backslash
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24507
diff
changeset
|
605 |
|
a2dcf460e141
run-tests: don't error when glob matched line ends with backslash
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24507
diff
changeset
|
606 |
$ cat > test-glob-backslash.t << EOF |
a2dcf460e141
run-tests: don't error when glob matched line ends with backslash
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24507
diff
changeset
|
607 |
> $ echo 'foo bar \\' |
a2dcf460e141
run-tests: don't error when glob matched line ends with backslash
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24507
diff
changeset
|
608 |
> foo * \ (glob) |
a2dcf460e141
run-tests: don't error when glob matched line ends with backslash
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24507
diff
changeset
|
609 |
> EOF |
a2dcf460e141
run-tests: don't error when glob matched line ends with backslash
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24507
diff
changeset
|
610 |
|
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
611 |
$ rt test-glob-backslash.t |
24811
a2dcf460e141
run-tests: don't error when glob matched line ends with backslash
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24507
diff
changeset
|
612 |
. |
a2dcf460e141
run-tests: don't error when glob matched line ends with backslash
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24507
diff
changeset
|
613 |
# Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
a2dcf460e141
run-tests: don't error when glob matched line ends with backslash
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24507
diff
changeset
|
614 |
|
a2dcf460e141
run-tests: don't error when glob matched line ends with backslash
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24507
diff
changeset
|
615 |
$ rm -f test-glob-backslash.t |
a2dcf460e141
run-tests: don't error when glob matched line ends with backslash
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24507
diff
changeset
|
616 |
|
25728
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
617 |
Test reusability for third party tools |
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
618 |
====================================== |
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
619 |
|
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
620 |
$ mkdir "$TESTTMP"/anothertests |
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
621 |
$ cd "$TESTTMP"/anothertests |
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
622 |
|
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
623 |
test that `run-tests.py` can execute hghave, even if it runs not in |
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
624 |
Mercurial source tree. |
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
625 |
|
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
626 |
$ cat > test-hghave.t <<EOF |
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
627 |
> #require true |
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
628 |
> $ echo foo |
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
629 |
> foo |
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
630 |
> EOF |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
631 |
$ rt $HGTEST_RUN_TESTS_PURE test-hghave.t |
25728
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
632 |
. |
905c32321cfb
run-tests.py: execute hghave by the path relative to run-tests.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25472
diff
changeset
|
633 |
# Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
25729
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
634 |
|
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
635 |
test that RUNTESTDIR refers the directory, in which `run-tests.py` now |
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
636 |
running is placed. |
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
637 |
|
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
638 |
$ cat > test-runtestdir.t <<EOF |
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
639 |
> - $TESTDIR, in which test-run-tests.t is placed |
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
640 |
> - \$TESTDIR, in which test-runtestdir.t is placed (expanded at runtime) |
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
641 |
> - \$RUNTESTDIR, in which run-tests.py is placed (expanded at runtime) |
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
642 |
> |
27057
c281c20ad0ad
test-run-tests: conditionalize the $TESTDIR check for Windows separator
Matt Harbison <matt_harbison@yahoo.com>
parents:
26432
diff
changeset
|
643 |
> #if windows |
c281c20ad0ad
test-run-tests: conditionalize the $TESTDIR check for Windows separator
Matt Harbison <matt_harbison@yahoo.com>
parents:
26432
diff
changeset
|
644 |
> $ test "\$TESTDIR" = "$TESTTMP\anothertests" |
c281c20ad0ad
test-run-tests: conditionalize the $TESTDIR check for Windows separator
Matt Harbison <matt_harbison@yahoo.com>
parents:
26432
diff
changeset
|
645 |
> #else |
25729
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
646 |
> $ test "\$TESTDIR" = "$TESTTMP"/anothertests |
27057
c281c20ad0ad
test-run-tests: conditionalize the $TESTDIR check for Windows separator
Matt Harbison <matt_harbison@yahoo.com>
parents:
26432
diff
changeset
|
647 |
> #endif |
25729
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
648 |
> $ test "\$RUNTESTDIR" = "$TESTDIR" |
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
649 |
> $ head -n 3 "\$RUNTESTDIR"/../contrib/check-code.py |
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
650 |
> #!/usr/bin/env python |
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
651 |
> # |
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
652 |
> # check-code - a style and portability checker for Mercurial |
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
653 |
> EOF |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
654 |
$ rt $HGTEST_RUN_TESTS_PURE test-runtestdir.t |
25729
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
655 |
. |
57dfadc4f46c
run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25728
diff
changeset
|
656 |
# Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
25730
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
657 |
|
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
658 |
#if execbit |
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
659 |
|
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
660 |
test that TESTDIR is referred in PATH |
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
661 |
|
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
662 |
$ cat > custom-command.sh <<EOF |
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
663 |
> #!/bin/sh |
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
664 |
> echo "hello world" |
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
665 |
> EOF |
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
666 |
$ chmod +x custom-command.sh |
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
667 |
$ cat > test-testdir-path.t <<EOF |
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
668 |
> $ custom-command.sh |
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
669 |
> hello world |
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
670 |
> EOF |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
671 |
$ rt $HGTEST_RUN_TESTS_PURE test-testdir-path.t |
25730
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
672 |
. |
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
673 |
# Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
674 |
|
c380d5273e91
run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25729
diff
changeset
|
675 |
#endif |
26109
bad09bd22b6a
run-tests: add support for marking tests as very slow
Augie Fackler <augie@google.com>
parents:
25730
diff
changeset
|
676 |
|
bad09bd22b6a
run-tests: add support for marking tests as very slow
Augie Fackler <augie@google.com>
parents:
25730
diff
changeset
|
677 |
test support for --allow-slow-tests |
bad09bd22b6a
run-tests: add support for marking tests as very slow
Augie Fackler <augie@google.com>
parents:
25730
diff
changeset
|
678 |
$ cat > test-very-slow-test.t <<EOF |
bad09bd22b6a
run-tests: add support for marking tests as very slow
Augie Fackler <augie@google.com>
parents:
25730
diff
changeset
|
679 |
> #require slow |
bad09bd22b6a
run-tests: add support for marking tests as very slow
Augie Fackler <augie@google.com>
parents:
25730
diff
changeset
|
680 |
> $ echo pass |
bad09bd22b6a
run-tests: add support for marking tests as very slow
Augie Fackler <augie@google.com>
parents:
25730
diff
changeset
|
681 |
> pass |
bad09bd22b6a
run-tests: add support for marking tests as very slow
Augie Fackler <augie@google.com>
parents:
25730
diff
changeset
|
682 |
> EOF |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
683 |
$ rt $HGTEST_RUN_TESTS_PURE test-very-slow-test.t |
26109
bad09bd22b6a
run-tests: add support for marking tests as very slow
Augie Fackler <augie@google.com>
parents:
25730
diff
changeset
|
684 |
s |
27564
80b53082a353
run-tests: report missing feature for skipped tests
timeless <timeless@mozdev.org>
parents:
27509
diff
changeset
|
685 |
Skipped test-very-slow-test.t: missing feature: allow slow tests |
26109
bad09bd22b6a
run-tests: add support for marking tests as very slow
Augie Fackler <augie@google.com>
parents:
25730
diff
changeset
|
686 |
# Ran 0 tests, 1 skipped, 0 warned, 0 failed. |
27395
0622d6e134fb
tests: avoid duplicate install steps in test-run-tests
Matt Mackall <mpm@selenic.com>
parents:
27393
diff
changeset
|
687 |
$ rt $HGTEST_RUN_TESTS_PURE --allow-slow-tests test-very-slow-test.t |
26109
bad09bd22b6a
run-tests: add support for marking tests as very slow
Augie Fackler <augie@google.com>
parents:
25730
diff
changeset
|
688 |
. |
bad09bd22b6a
run-tests: add support for marking tests as very slow
Augie Fackler <augie@google.com>
parents:
25730
diff
changeset
|
689 |
# Ran 1 tests, 0 skipped, 0 warned, 0 failed. |