@@ -13,37 +13,37 @@ function usage() {
13
13
cat << EOF
14
14
Runs commons tests for local or hosted CI.
15
15
16
- Usage: $0 (-h|-3fxbkmsrjlpuyncia )
16
+ Usage: $0 (-h|-3fxbkmrjlpuneycitz )
17
17
-h print out this help message
18
18
-3 After pants is bootstrapped, set --python-setup-interpreter-constraints such that any
19
19
python tests run with Python 3.
20
- -f skip python code formatting checks
21
- -x skip bootstrap clean-all (assume bootstrapping from a
20
+ -f run python code formatting checks
21
+ -x run bootstrap clean-all (assume bootstrapping from a
22
22
fresh clone)
23
23
-b skip bootstrapping pants from local sources
24
- -k skip bootstrapped pants self compile check
25
- -m skip sanity checks of bootstrapped pants and repo BUILD
24
+ -k run bootstrapped pants self compile check
25
+ -m run sanity checks of bootstrapped pants and repo BUILD
26
26
files
27
- -r skip doc generation tests
28
- -j skip core jvm tests
29
- -l skip internal backends python tests
30
- -p skip core python tests
27
+ -r run doc generation tests
28
+ -j run core jvm tests
29
+ -l run internal backends python tests
30
+ -p run core python tests
31
31
-u SHARD_NUMBER/TOTAL_SHARDS
32
32
if running core python tests, divide them into
33
33
TOTAL_SHARDS shards and just run those in SHARD_NUMBER
34
34
to run only even tests: '-u 0/2', odd: '-u 1/2'
35
- -n skip contrib python tests
36
- -e skip rust tests
35
+ -n run contrib python tests
36
+ -e run rust tests
37
37
-y SHARD_NUMBER/TOTAL_SHARDS
38
38
if running contrib python tests, divide them into
39
39
TOTAL_SHARDS shards and just run those in SHARD_NUMBER
40
40
to run only even tests: '-u 0/2', odd: '-u 1/2'
41
- -c skip pants integration tests (includes examples and testprojects)
41
+ -c run pants integration tests (includes examples and testprojects)
42
42
-i SHARD_NUMBER/TOTAL_SHARDS
43
43
if running integration tests, divide them into
44
44
TOTAL_SHARDS shards and just run those in SHARD_NUMBER
45
45
to run only even tests: '-i 0/2', odd: '-i 1/2'
46
- -t skip lint
46
+ -t run lint
47
47
-z test platform-specific behavior
48
48
EOF
49
49
if (( $# > 0 )) ; then
@@ -68,22 +68,22 @@ while getopts "h3fxbkmrjlpeu:ny:ci:tz" opt; do
68
68
case ${opt} in
69
69
h) usage ;;
70
70
3) python_three=" true" ;;
71
- f) skip_pre_commit_checks =" true" ;;
72
- x) skip_bootstrap_clean =" true" ;;
73
- b) skip_bootstrap= " true " ;;
71
+ f) run_pre_commit_checks =" true" ;;
72
+ x) run_bootstrap_clean =" true" ;;
73
+ b) run_bootstrap= " false " ;;
74
74
k) bootstrap_compile_args=() ;;
75
- m) skip_sanity_checks =" true" ;;
76
- r) skip_docs =" true" ;;
77
- j) skip_jvm =" true" ;;
78
- l) skip_internal_backends =" true" ;;
79
- p) skip_python =" true" ;;
75
+ m) run_sanity_checks =" true" ;;
76
+ r) run_docs =" true" ;;
77
+ j) run_jvm =" true" ;;
78
+ l) run_internal_backends =" true" ;;
79
+ p) run_python =" true" ;;
80
80
u) python_unit_shard=${OPTARG} ;;
81
- e) skip_rust_tests =" true" ;;
82
- n) skip_contrib =" true" ;;
81
+ e) run_rust_tests =" true" ;;
82
+ n) run_contrib =" true" ;;
83
83
y) python_contrib_shard=${OPTARG} ;;
84
- c) skip_integration =" true" ;;
84
+ c) run_integration =" true" ;;
85
85
i) python_intg_shard=${OPTARG} ;;
86
- t) skip_lint =" true" ;;
86
+ t) run_lint =" true" ;;
87
87
z) test_platform_specific_behavior=" true" ;;
88
88
* ) usage " Invalid option: -${OPTARG} " ;;
89
89
esac
@@ -104,16 +104,16 @@ case "${OSTYPE}" in
104
104
;;
105
105
esac
106
106
107
- if [[ " ${skip_pre_commit_checks :- false} " == " false " ]]; then
107
+ if [[ " ${run_pre_commit_checks :- false} " == " true " ]]; then
108
108
start_travis_section " PreCommit" " Running pre-commit checks"
109
109
FULL_CHECK=1 ./build-support/bin/pre-commit.sh || exit 1
110
110
end_travis_section
111
111
fi
112
112
113
- if [[ " ${skip_bootstrap :- false } " == " false " ]]; then
113
+ if [[ " ${run_bootstrap :- true } " == " true " ]]; then
114
114
start_travis_section " Bootstrap" " Bootstrapping pants"
115
115
(
116
- if [[ " ${skip_bootstrap_clean :- false} " == " false " ]]; then
116
+ if [[ " ${run_bootstrap_clean :- false} " == " true " ]]; then
117
117
./build-support/python/clean.sh || die " Failed to clean before bootstrapping pants."
118
118
fi
119
119
./pants ${bootstrap_compile_args[@]} binary \
@@ -134,7 +134,7 @@ if [[ "${python_three:-false}" == "true" ]]; then
134
134
./pants.pex clean-all
135
135
fi
136
136
137
- if [[ " ${skip_sanity_checks :- false} " == " false " ]]; then
137
+ if [[ " ${run_sanity_checks :- false} " == " true " ]]; then
138
138
start_travis_section " SanityCheck" " Sanity checking bootstrapped pants and repo BUILD files"
139
139
sanity_tests=(
140
140
" bash-completion"
@@ -153,29 +153,29 @@ if [[ "${skip_sanity_checks:-false}" == "false" ]]; then
153
153
end_travis_section
154
154
fi
155
155
156
- if [[ " ${skip_lint :- false} " == " false " ]]; then
156
+ if [[ " ${run_lint :- false} " == " true " ]]; then
157
157
start_travis_section " Lint" " Running lint checks"
158
158
(
159
159
./pants.pex --tag=-nolint lint contrib:: examples:: src:: tests:: zinc::
160
160
) || die " Lint check failure"
161
161
end_travis_section
162
162
fi
163
163
164
- if [[ " ${skip_docs :- false} " == " false " ]]; then
164
+ if [[ " ${run_docs :- false} " == " true " ]]; then
165
165
start_travis_section " DocGen" " Running site doc generation test"
166
166
./build-support/bin/publish_docs.sh || die " Failed to generate site docs."
167
167
end_travis_section
168
168
fi
169
169
170
- if [[ " ${skip_jvm :- false} " == " false " ]]; then
170
+ if [[ " ${run_jvm :- false} " == " true " ]]; then
171
171
start_travis_section " CoreJVM" " Running core jvm tests"
172
172
(
173
173
./pants.pex doc test {src,tests}/{java,scala}:: zinc::
174
174
) || die " Core jvm test failure"
175
175
end_travis_section
176
176
fi
177
177
178
- if [[ " ${skip_internal_backends :- false} " == " false " ]]; then
178
+ if [[ " ${run_internal_backends :- false} " == " true " ]]; then
179
179
start_travis_section " BackendTests" " Running internal backend python tests"
180
180
(
181
181
./pants.pex test.pytest \
@@ -184,7 +184,7 @@ if [[ "${skip_internal_backends:-false}" == "false" ]]; then
184
184
end_travis_section
185
185
fi
186
186
187
- if [[ " ${skip_python :- false} " == " false " ]]; then
187
+ if [[ " ${run_python :- false} " == " true " ]]; then
188
188
if [[ " 0/1" != " ${python_unit_shard} " ]]; then
189
189
shard_desc=" [shard ${python_unit_shard} ]"
190
190
fi
@@ -202,7 +202,7 @@ if [[ "${skip_python:-false}" == "false" ]]; then
202
202
end_travis_section
203
203
fi
204
204
205
- if [[ " ${skip_contrib :- false} " == " false " ]]; then
205
+ if [[ " ${run_contrib :- false} " == " true " ]]; then
206
206
if [[ " 0/1" != " ${python_contrib_shard} " ]]; then
207
207
shard_desc=" [shard ${python_contrib_shard} ]"
208
208
fi
@@ -215,7 +215,7 @@ if [[ "${skip_contrib:-false}" == "false" ]]; then
215
215
end_travis_section
216
216
fi
217
217
218
- if [[ " ${skip_rust_tests :- false} " == " false " ]]; then
218
+ if [[ " ${run_rust_tests :- false} " == " true " ]]; then
219
219
start_travis_section " RustTests" " Running Pants rust tests"
220
220
(
221
221
test_threads_flag=" "
@@ -244,7 +244,7 @@ if [[ "${test_platform_specific_behavior:-false}" == 'true' ]]; then
244
244
fi
245
245
246
246
247
- if [[ " ${skip_integration :- false} " == " false " ]]; then
247
+ if [[ " ${run_integration :- false} " == " true " ]]; then
248
248
if [[ " 0/1" != " ${python_intg_shard} " ]]; then
249
249
shard_desc=" [shard ${python_intg_shard} ]"
250
250
fi
0 commit comments