@@ -25,6 +25,7 @@ parameters:
25
25
no-default-features : false # Do not activate the `default` feature
26
26
27
27
# parameters from libtest `cargo test -- --help`
28
+ # TODO: specifying a portion of these does not work
28
29
test_flags :
29
30
include-ignored : false # Run ignored and not ignored tests
30
31
ignored : false # Run only ignored tests
@@ -41,6 +42,7 @@ parameters:
41
42
quite : false # Display one character per test instead of one line.
42
43
# Alias to --format=terse
43
44
exact : false # Exactly match filters rather than by substring
45
+ ensure-time : true # Treat excess of the test execution time limit as error. (unstable)
44
46
color : ' ' # auto|always|never
45
47
# Configure coloring of output: auto = colorize if
46
48
# stdout is a tty and tests are run on serially
@@ -50,7 +52,7 @@ parameters:
50
52
# Configure formatting of output: pretty = Print verbose
51
53
# output; terse = Display one character per test; json =
52
54
# Output a json document
53
- Z : [] # unstable-options Enable nightly-only flags: unstable-options = Allow
55
+ Z : ['unstable-options'] # unstable-options Enable nightly-only flags: unstable-options = Allow
54
56
# use of experimental features
55
57
56
58
66
68
variables :
67
69
check_flags : ' '
68
70
test_build_flags : ' '
71
+
72
+ # Time limits for `--ensure-time`
73
+ RUST_TEST_TIME_UNIT : ' 2,10'
74
+ RUST_TEST_TIME_INTEGRATION : ' 4,30'
75
+ RUST_TEST_TIME_DOCTEST : ' 8,40'
69
76
steps :
70
77
# Custom pre steps:
71
78
- script : $(prepareScript)
@@ -141,6 +148,10 @@ jobs:
141
148
enabled : ${{ parameters.test_flags['exact'] }}
142
149
displayName : " [cli flag modify]Exactly match filters rather than by substring"
143
150
151
+ - script : echo '##vso[task.setvariable variable=check_flags]$(check_flags) --ensure-time'
152
+ enabled : ${{ parameters.test_flags['ensure-time'] }}
153
+ displayName : " [cli flag modify]Treat excess of the test execution time limit as error"
154
+
144
155
- script : echo "##vso[task.setvariable variable=check_flags]$(check_flags) --color ${{ parameters.test_flags['color'] }}"
145
156
enabled : ${{ ne(parameters.test_flags['color'], '') }}
146
157
displayName : " [cli flag modify] Configure coloring of output: ${{ parameters.test_flags['color'] }}"
@@ -150,7 +161,7 @@ jobs:
150
161
displayName : " [cli flag modify] Configure formatting of output: ${{ parameters.test_flags['format'] }}"
151
162
152
163
- ${{ each z in parameters.test_flags['Z'] }} :
153
- - script : echo '##vso[task.setvariableV variable=check_flags]$(check_flags) - -Z ${{ z }}'
164
+ - script : echo '##vso[task.setvariable variable=check_flags]$(check_flags) -Z ${{ z }}'
154
165
displayName : " [cli flag modify] unstable-option: ${{ z }}"
155
166
156
167
# *********************************************************************************************
0 commit comments