@@ -91,6 +91,10 @@ function run_std_build() {
91
91
if [[ ! -z $target ]]; then
92
92
for val in ${target// ,/ }
93
93
do
94
+ # if the target ends with -linux-gnu but does not have unknown, add unknown
95
+ if [[ $val == * " -linux-gnu" && $val != * " unknown-linux-gnu" ]]; then
96
+ val=" ${val/ -linux-gnu/ -unknown-linux-gnu} "
97
+ fi
94
98
new_cmd=" $cmd --target=$val "
95
99
log " Running $new_cmd "
96
100
eval " $new_cmd "
@@ -129,7 +133,7 @@ function run_doc() {
129
133
log " Building book"
130
134
log " Building preprocessor for the book"
131
135
cargo build --release -p errorcode_book_generator
132
- cd book && mdbook build
136
+ cd book && mdbook build
133
137
# test is disabled because not all files in the book exist. The pre-processor for error codes adds new files
134
138
# mdbook test
135
139
}
@@ -163,7 +167,7 @@ function run_test() {
163
167
rm -rf " $project_location /test_results"
164
168
make_dir " $project_location /test_results"
165
169
# JUnit test should run via cargo-nextest
166
- log " cargo-nextest nextest run $CARGO_OPTIONS --lib --profile ci \
170
+ log " cargo-nextest nextest run $CARGO_OPTIONS --lib --profile ci \
167
171
mv " $project_location " /target/nextest/ci/junit.xml " $project_location " /test_results/unit_tests.xml"
168
172
cargo-nextest nextest run $CARGO_OPTIONS --lib --profile ci
169
173
mv " $project_location " /target/nextest/ci/junit.xml " $project_location " /test_results/unit_tests.xml
@@ -176,11 +180,11 @@ function run_test() {
176
180
mv " $project_location " /target/nextest/ci/junit.xml " $project_location " /test_results/integration_tests.xml
177
181
178
182
# Run the std integration
179
- log " cargo-nextest nextest run $CARGO_OPTIONS --profile ci -p iec61131std --test '*' \
183
+ log " cargo-nextest nextest run $CARGO_OPTIONS --profile ci -p iec61131std --test '*' \
180
184
mv " $project_location " /target/nextest/ci/junit.xml " $project_location " /test_results/std_integration_tests.xml"
181
185
cargo-nextest nextest run $CARGO_OPTIONS --profile ci -p iec61131std --test ' *'
182
186
mv " $project_location " /target/nextest/ci/junit.xml " $project_location " /test_results/std_integration_tests.xml
183
-
187
+
184
188
else
185
189
cargo test $CARGO_OPTIONS --workspace
186
190
fi
@@ -222,7 +226,12 @@ function run_package_std() {
222
226
do
223
227
lib_dir=$OUTPUT_DIR /$val /lib
224
228
make_dir $lib_dir
225
- rel_dir=" $target_dir /$val "
229
+
230
+ # if the target ends with -linux-gnu but does not have unknown, add unknown
231
+ if [[ $val == * " -linux-gnu" && $val != * " unknown-linux-gnu" ]]; then
232
+ rustc_target=" ${val/ -linux-gnu/ -unknown-linux-gnu} "
233
+ fi
234
+ rel_dir=" $target_dir /$rustc_target "
226
235
if [[ $release -ne 0 ]]; then
227
236
rel_dir=" $rel_dir /release"
228
237
else
0 commit comments