Commit 94a9b261 authored by Fabio Utzig's avatar Fabio Utzig Committed by Fabio Utzig
Browse files

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: default avatarFabio Utzig <utzig@apache.org>
parent 0717552d
Loading
Loading
Loading
Loading
+12 −14
Changes for .travis.yml: 12 added lines, 14 removed lines.
Original line number Diff line number Diff line
@@ -9,28 +9,28 @@ matrix:
    # Runs each value defined in $SINGLE_FEATURES by itself in the order
    # the were defined.
    - os: linux
      env: SINGLE_FEATURES="sig-ecdsa enc-kw bootstrap"
      env: SINGLE_FEATURES="sig-ecdsa enc-kw bootstrap" TEST=sim
    - os: linux
      env: SINGLE_FEATURES="none sig-rsa overwrite-only validate-slot0"
      env: SINGLE_FEATURES="none sig-rsa overwrite-only validate-slot0" TEST=sim
    - os: linux
      env: SINGLE_FEATURES="enc-rsa"
      env: SINGLE_FEATURES="enc-rsa" TEST=sim

    # Values defined in $MULTI_FEATURES consist of any number of features
    # to be enabled at the same time. The list of multi-values should be
    # separated by ',' and each list of values is run sequentially in the
    # defined order.
    - os: linux
      env: MULTI_FEATURES="sig-rsa overwrite-only,sig-ecdsa overwrite-only"
      env: MULTI_FEATURES="sig-rsa overwrite-only,sig-ecdsa overwrite-only" TEST=sim
    - os: linux
      env: MULTI_FEATURES="sig-rsa validate-slot0,sig-ecdsa validate-slot0"
      env: MULTI_FEATURES="sig-rsa validate-slot0,sig-ecdsa validate-slot0" TEST=sim
    - os: linux
      env: MULTI_FEATURES="enc-kw overwrite-only,enc-rsa overwrite-only"
      env: MULTI_FEATURES="enc-kw overwrite-only,enc-rsa overwrite-only" TEST=sim
    - os: linux
      env: MULTI_FEATURES="sig-rsa enc-rsa validate-slot0"
      env: MULTI_FEATURES="sig-rsa enc-rsa validate-slot0" TEST=sim
    - os: linux
      env: MULTI_FEATURES="sig-rsa enc-kw validate-slot0 bootstrap"
      env: MULTI_FEATURES="sig-rsa enc-kw validate-slot0 bootstrap" TEST=sim
    - os: linux
      env: MULTI_FEATURES="sig-ecdsa enc-kw validate-slot0"
      env: MULTI_FEATURES="sig-ecdsa enc-kw validate-slot0" TEST=sim

    # FIXME: this test actually fails and must be fixed
    #- os: linux
@@ -39,19 +39,17 @@ matrix:
before_install:
  - |
    if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
      ./scripts/check-signed-off-by.sh
      ./ci/check-signed-off-by.sh
      if [ $? -ne 0 ]; then
        exit 1
      fi
    fi

install:
  - pushd sim
  - cargo fetch
  - popd
  - ./ci/${TEST}_install.sh

script:
  - ./scripts/run_tests.sh
  - ./ci/${TEST}_run.sh

notifications:
  slack:
+x+17
Changes for ci/sim_install.sh: 17 added lines, 0 removed lines.
Original line number Diff line number Diff line
#!/bin/bash -x

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

pushd sim && cargo fetch
[[ $? -ne 0 ]] && exit 1
popd
+1 −1
Changes for ci/sim_run.sh: 1 added line, 1 removed line.
Original line number Diff line number Diff line
#!/bin/bash
#!/bin/bash -x

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