From cac838155eb97bd308a30fb5592da003a7983238 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Wed, 6 Jan 2016 13:09:17 +0100 Subject: [PATCH 1/2] travis: skip unsupported utils on stable/beta builds --- .travis.yml | 1 + .travis_fixup.sh | 24 ++++++++++++++++++++++++ Cargo.toml | 10 +++++----- 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100755 .travis_fixup.sh diff --git a/.travis.yml b/.travis.yml index 0c4ad6257..e4433434e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ cache: - $HOME/.cargo sudo: false script: + - ./.travis_fixup.sh - cargo build - cargo test --no-fail-fast matrix: diff --git a/.travis_fixup.sh b/.travis_fixup.sh new file mode 100755 index 000000000..ff1481645 --- /dev/null +++ b/.travis_fixup.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +if [ "$CI" != "true" ]; then + exit 1 +fi + +case "$TRAVIS_RUST_VERSION" in + "beta") + skip=$(grep skip_on_beta Cargo.toml | cut -d\" -f 2) + sed -i.org "/skip_on_beta/d" Cargo.toml + ;; + "stable") + skip=$(grep -E "skip_on_beta|skip_on_stable" Cargo.toml | cut -d\" -f 2) + sed -i.org "/skip_on_beta/d" Cargo.toml + sed -i.org "/skip_on_stable/d" Cargo.toml + ;; +esac + +for x in $skip; do + if [ -f tests/$x.rs ]; then + mv tests/$x.rs tests/$x.rs.skip + fi +done + diff --git a/Cargo.toml b/Cargo.toml index 05a010044..427c93c80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,11 +40,11 @@ generic = [ "dirname", "echo", "env", - "expand", + "expand", # skip_on_beta "expr", "factor", "false", - "fmt", + "fmt", # skip_on_beta "fold", "hashsum", "head", @@ -56,7 +56,7 @@ generic = [ "od", "paste", "printenv", - "ptx", + "ptx", # skip_on_stable "pwd", "readlink", "realpath", @@ -75,11 +75,11 @@ generic = [ "tail", "tee", "test", - "tr", + "tr", # skip_on_beta "true", "truncate", "tsort", - "unexpand", + "unexpand", # skip_on_beta "uniq", "wc", "whoami", From 36bd97a3057115d653efe44e59802031f6e26134 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Wed, 6 Jan 2016 13:46:17 +0100 Subject: [PATCH 2/2] travis: drop stable/beta from allowed failures --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e4433434e..f7718d283 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,4 @@ script: - cargo test --no-fail-fast matrix: allow_failures: - - rust: stable - - rust: beta - os: osx