summaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-09-19 10:44:57 +0200
committerMatthias Beyer <mail@beyermatthias.de>2016-09-19 10:44:57 +0200
commitde6b641201a5e33ec3293064e53c7d5afc36d291 (patch)
treeb12e5bfd1acf058da346256e37ccb1e23843bc26 /.travis.yml
parent172614004aad7975238e96bc065aaba42dd22105 (diff)
parentc35b08b4dcd56250cdf188ae298c860816294cd2 (diff)
Merge branch 'master' into libimagstorestdhook/git-integration
This is a integration-merge, because the libimagstorestdhook/git branch got really long and rebasing is not an option, as it would mainly destroy history. Using an integration branch is less hassle, really.
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml54
1 files changed, 18 insertions, 36 deletions
diff --git a/.travis.yml b/.travis.yml
index 8b2752fa..633b0edb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,43 +20,21 @@ before_script:
export PATH=$HOME/.local/bin:$PATH
script:
- |
- travis_cargo_run_in() {
- echo ":: Trying to run cargo in $1"
- [[ -d "$1" ]] &&
- cd "$1" &&
- {
- {
- if [[ $(echo "$1" | grep lib) ]]; then
- travis-cargo -q test
- else
- travis-cargo -q build
- fi
- } &&
- cd -
- } || exit 1
- }
-
- run_sh_test() {
- echo "--- Running test script: '$1'"
- bash $1 || { echo "--- Test failed. Exiting"; exit 1; }
- echo "--- Test script $1 executed successfully"
- }
-
- echo "<< Changes in ./doc are not build by CI >>"
+ if [[ "$TEST_SUITE" == "binaries" ]]; then
+ make $(find . -maxdepth 1 -name "imag-*" -type d -printf "%f ") && \
+ for d in $(find -name "Cargo.toml" | grep -vE "^./Cargo.toml$"); do
+ dir=$(dirname $d)
+ echo "--- Running test scripts ---"
+ for testsh in $(find $dir -iname "*test.sh"); do
+ echo "--- Running test script: '$testsh'"
+ bash $testsh || { echo "--- Test failed. Exiting"; exit 1; }
+ echo "--- Test script $testsh executed successfully"
+ done
+ done
+ else # $TEST_SUITE == "libraries"
+ make $(find . -maxdepth 1 -name "libimag*" -printf "test-%f ")
+ fi
- for d in $(find -name "Cargo.toml" | grep -vE "^./Cargo.toml$"); do
- echo ":: Working on $d"
- dir=$(dirname $d)
- { \
- echo -e "\n--- Running in $d ---\n" && \
- travis_cargo_run_in $dir && \
- echo "--- Running test scripts ---" && \
- for testsh in $(find $dir -iname "*test.sh"); do
- run_sh_test $testsh
- done && \
- echo -e "--- Done with test scripts ---\n\n"
- } || true
- done
addons:
apt:
packages:
@@ -65,6 +43,7 @@ addons:
- libdw-dev
- libelf-dev
- libzzip-dev
+ - make
- tree
sources:
- kalakris-cmake
@@ -83,6 +62,9 @@ notifications:
template:
- "%{repository_name} (%{branch} @ %{commit} by %{author}): %{result}"
env:
+ matrix:
+ - TEST_SUITE=binaries
+ - TEST_SUITE=libraries
global:
- TRAVIS_CARGO_NIGHTLY_FEATURE=dev
- secure: D+3exBnbvzFvk7fvLOxkF7UotCc4gBbvvOW4xGr9u6dDjEjV5y6CdDy/OQAkhfKhvSou+lIC22g5MuCBQXFEf/ua7A1XzwBAFeVLK4cWZSa7+ql6LdHKqOg3oF6pQlh095WeWr8S2PYJFFJFg8RGUPnbjqdu1J4KSXqe/7GoZ3lYS69mx7D5Hb93KEN084/KGfBuvyJtMjO1fK3spltL2zV8oqegFpv0gLG5GY4LsJ/7ij4Mc6wepXSyyQbaiA1eKMMwQZDvoi4V1mCulo/jeC3pucGxvgnMV5DZs8aa8R7votltGvSpHCgU78LW19dg8oZqwShQQ+XUYw27H+QK5V1lz1l1MaJLbwS3ySyZBPGH8qUuOzQ3bLp9xhAIRgCui3kX/UDhmeME7nJI6k3UZydh+/ydNB1BZHTKn76XS/yFj0Gcibxg7f5fcAYA6Ge5Sg+YPozuwbcKnKe6IpN2M7qNgWa+6MCSXJ1v4BgPb7kN74EynJUM8+yWEFN7MZtWEUQ4ZsHdCs8Pub4C/zHpYGV8qGenZwQzosAFq56YwoGCvJezz35yg4BDd3IMKenOzNnXLBrdxxqX8ySgwt5B3zBqwve/64Lx6OXjae2m8wZKlsmeqad/s6K7nx0zG15/qqRIzyvgcLXq3jwBaHkteq49FRFWvHQFpBQcsPZ2uH4=