Skip to content

Commit 94a9b26

Browse files
committed
Create CI resources directory
Add a new directory "ci", to easily add new tests with setup/run phases that don't require direct setup in .travis.yml. This also avoids polution of scripts/. Signed-off-by: Fabio Utzig <[email protected]>
1 parent 0717552 commit 94a9b26

File tree

4 files changed

+30
-15
lines changed

4 files changed

+30
-15
lines changed

.travis.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@ matrix:
99
# Runs each value defined in $SINGLE_FEATURES by itself in the order
1010
# the were defined.
1111
- os: linux
12-
env: SINGLE_FEATURES="sig-ecdsa enc-kw bootstrap"
12+
env: SINGLE_FEATURES="sig-ecdsa enc-kw bootstrap" TEST=sim
1313
- os: linux
14-
env: SINGLE_FEATURES="none sig-rsa overwrite-only validate-slot0"
14+
env: SINGLE_FEATURES="none sig-rsa overwrite-only validate-slot0" TEST=sim
1515
- os: linux
16-
env: SINGLE_FEATURES="enc-rsa"
16+
env: SINGLE_FEATURES="enc-rsa" TEST=sim
1717

1818
# Values defined in $MULTI_FEATURES consist of any number of features
1919
# to be enabled at the same time. The list of multi-values should be
2020
# separated by ',' and each list of values is run sequentially in the
2121
# defined order.
2222
- os: linux
23-
env: MULTI_FEATURES="sig-rsa overwrite-only,sig-ecdsa overwrite-only"
23+
env: MULTI_FEATURES="sig-rsa overwrite-only,sig-ecdsa overwrite-only" TEST=sim
2424
- os: linux
25-
env: MULTI_FEATURES="sig-rsa validate-slot0,sig-ecdsa validate-slot0"
25+
env: MULTI_FEATURES="sig-rsa validate-slot0,sig-ecdsa validate-slot0" TEST=sim
2626
- os: linux
27-
env: MULTI_FEATURES="enc-kw overwrite-only,enc-rsa overwrite-only"
27+
env: MULTI_FEATURES="enc-kw overwrite-only,enc-rsa overwrite-only" TEST=sim
2828
- os: linux
29-
env: MULTI_FEATURES="sig-rsa enc-rsa validate-slot0"
29+
env: MULTI_FEATURES="sig-rsa enc-rsa validate-slot0" TEST=sim
3030
- os: linux
31-
env: MULTI_FEATURES="sig-rsa enc-kw validate-slot0 bootstrap"
31+
env: MULTI_FEATURES="sig-rsa enc-kw validate-slot0 bootstrap" TEST=sim
3232
- os: linux
33-
env: MULTI_FEATURES="sig-ecdsa enc-kw validate-slot0"
33+
env: MULTI_FEATURES="sig-ecdsa enc-kw validate-slot0" TEST=sim
3434

3535
# FIXME: this test actually fails and must be fixed
3636
#- os: linux
@@ -39,19 +39,17 @@ matrix:
3939
before_install:
4040
- |
4141
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
42-
./scripts/check-signed-off-by.sh
42+
./ci/check-signed-off-by.sh
4343
if [ $? -ne 0 ]; then
4444
exit 1
4545
fi
4646
fi
4747
4848
install:
49-
- pushd sim
50-
- cargo fetch
51-
- popd
49+
- ./ci/${TEST}_install.sh
5250

5351
script:
54-
- ./scripts/run_tests.sh
52+
- ./ci/${TEST}_run.sh
5553

5654
notifications:
5755
slack:
File renamed without changes.

ci/sim_install.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash -x
2+
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
pushd sim && cargo fetch
16+
[[ $? -ne 0 ]] && exit 1
17+
popd

scripts/run_tests.sh renamed to ci/sim_run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/bash -x
22

33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)