summaryrefslogtreecommitdiffstats
path: root/third_party/rust/failure/travis.sh
blob: 6c621ca5dd7d12b35c71c61a5189c9ec5e527aa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

cargo_test() {
   cargo test "$@" || { exit 101; }
}

test_failure_in() {
  cd $1
  cargo_test
  cargo_test --no-default-features
  cargo_test --features backtrace
  test_derive_in "$1/failure_derive"
  cd $DIR
}

test_derive_in() {
  cd $1
  cargo_test
  cd $DIR
}

test_nightly_features_in() {
  cd $1
  #cargo_test --features small-error
  cargo_test --all-features
  cd $DIR
}

main() {
  test_failure_in "$DIR/failure-1.X"
  test_failure_in "$DIR/failure-0.1.X"
  if [ "${TRAVIS_RUST_VERSION}" = "nightly" ]; then
    test_nightly_features_in "$DIR/failure-1.X"
  fi
}

main