Show More
@@ -2,6 +2,7 b' Test UI worker interaction' | |||||
2 |
|
2 | |||
3 | $ cat > t.py <<EOF |
|
3 | $ cat > t.py <<EOF | |
4 | > from __future__ import absolute_import, print_function |
|
4 | > from __future__ import absolute_import, print_function | |
|
5 | > import time | |||
5 | > from mercurial import ( |
|
6 | > from mercurial import ( | |
6 | > cmdutil, |
|
7 | > cmdutil, | |
7 | > error, |
|
8 | > error, | |
@@ -22,6 +23,7 b' Test UI worker interaction' | |||||
22 | > for arg in args: |
|
23 | > for arg in args: | |
23 | > ui.status('run\n') |
|
24 | > ui.status('run\n') | |
24 | > yield 1, arg |
|
25 | > yield 1, arg | |
|
26 | > time.sleep(0.1) # easier to trigger killworkers code path | |||
25 | > functable = { |
|
27 | > functable = { | |
26 | > 'abort': abort, |
|
28 | > 'abort': abort, | |
27 | > 'exc': exc, |
|
29 | > 'exc': exc, | |
@@ -74,20 +76,20 b' Run tests without worker by forcing a lo' | |||||
74 |
|
76 | |||
75 | Known exception should be caught, but printed if --traceback is enabled |
|
77 | Known exception should be caught, but printed if --traceback is enabled | |
76 |
|
78 | |||
77 |
$ hg --config "extensions.t=$abspath" --config 'worker.numcpus= |
|
79 | $ hg --config "extensions.t=$abspath" --config 'worker.numcpus=8' \ | |
78 | > test 100000.0 abort |
|
80 | > test 100000.0 abort 2>&1 | |
79 | start |
|
81 | start | |
80 | abort: known exception |
|
82 | abort: known exception | |
81 | [255] |
|
83 | [255] | |
82 |
|
84 | |||
83 |
$ hg --config "extensions.t=$abspath" --config 'worker.numcpus= |
|
85 | $ hg --config "extensions.t=$abspath" --config 'worker.numcpus=8' \ | |
84 | > test 100000.0 abort --traceback 2>&1 | egrep '^(SystemExit|Abort)' |
|
86 | > test 100000.0 abort --traceback 2>&1 | egrep '^(SystemExit|Abort)' | |
85 | Abort: known exception |
|
87 | Abort: known exception | |
86 | SystemExit: 255 |
|
88 | SystemExit: 255 | |
87 |
|
89 | |||
88 | Traceback must be printed for unknown exceptions |
|
90 | Traceback must be printed for unknown exceptions | |
89 |
|
91 | |||
90 |
$ hg --config "extensions.t=$abspath" --config 'worker.numcpus= |
|
92 | $ hg --config "extensions.t=$abspath" --config 'worker.numcpus=8' \ | |
91 | > test 100000.0 exc 2>&1 | grep '^Exception' |
|
93 | > test 100000.0 exc 2>&1 | grep '^Exception' | |
92 | Exception: unknown exception |
|
94 | Exception: unknown exception | |
93 |
|
95 |
General Comments 0
You need to be logged in to leave comments.
Login now