@@ -147,37 +147,25 @@ function run_test() {
147
147
# Delete the test results if they exist
148
148
rm -rf " $project_location /test_results"
149
149
make_dir " $project_location /test_results"
150
- # JUnit test should run on nightly
151
- log " cargo +nightly test $CARGO_OPTIONS --lib -- --format=junit \
152
- -Zunstable-options \
153
- | split -l1 - " $project_location " /test_results/unit_tests \
154
- -d --additional-suffix=.xml
155
- "
156
- cargo +nightly test $CARGO_OPTIONS --lib -- --format=junit \
157
- -Zunstable-options \
158
- | split -l1 - " $project_location " /test_results/unit_tests \
159
- -d --additional-suffix=.xml
150
+ # JUnit test should run via cargo-nextest
151
+ log " cargo-nextest nextest run $CARGO_OPTIONS --lib --profile ci \
152
+ mv " $project_location " /target/nextest/ci/junit.xml " $project_location " /test_results/unit_tests.xml"
153
+ cargo-nextest nextest run $CARGO_OPTIONS --lib --profile ci
154
+ mv " $project_location " /target/nextest/ci/junit.xml " $project_location " /test_results/unit_tests.xml
160
155
161
156
# Run only the integration tests
162
157
# https://stackoverflow.com/questions/62447864/how-can-i-run-only-integration-tests
163
- log " cargo +nightly test $CARGO_OPTIONS --test '*' -- --format=junit \
164
- -Zunstable-options \
165
- | split -l1 - " $project_location " /test_results/integration_tests \
166
- -d --additional-suffix=.xml"
167
- cargo +nightly test $CARGO_OPTIONS --test ' *' -- --format=junit \
168
- -Zunstable-options \
169
- | split -l1 - " $project_location " /test_results/integration_tests \
170
- -d --additional-suffix=.xml
158
+ log " cargo-nextest nextest run $CARGO_OPTIONS --profile ci --test '*' \
159
+ mv " $project_location " /target/nextest/ci/junit.xml " $project_location " /test_results/integration_tests.xml "
160
+ cargo-nextest nextest run $CARGO_OPTIONS --profile ci --test ' *'
161
+ mv " $project_location " /target/nextest/ci/junit.xml " $project_location " /test_results/integration_tests.xml
171
162
172
163
# Run the std integration
173
- log " cargo +nightly test $CARGO_OPTIONS -p iec61131std --test '*' -- --format=junit \
174
- -Zunstable-options \
175
- | split -l1 - " $project_location " /test_results/std_integration_tests \
176
- -d --additional-suffix=.xml"
177
- cargo +nightly test $CARGO_OPTIONS -p iec61131std --test ' *' -- --format=junit \
178
- -Zunstable-options \
179
- | split -l1 - " $project_location " /test_results/std_integration_tests \
180
- -d --additional-suffix=.xml
164
+ log " cargo-nextest nextest run $CARGO_OPTIONS --profile ci -p iec61131std --test '*' \
165
+ mv " $project_location " /target/nextest/ci/junit.xml " $project_location " /test_results/std_integration_tests.xml"
166
+ cargo-nextest nextest run $CARGO_OPTIONS --profile ci -p iec61131std --test ' *'
167
+ mv " $project_location " /target/nextest/ci/junit.xml " $project_location " /test_results/std_integration_tests.xml
168
+
181
169
else
182
170
cargo test $CARGO_OPTIONS --workspace
183
171
fi
0 commit comments