diff --git a/.travis.yml b/.travis.yml index 748adee..64ef4bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,2 +1,3 @@ +script: ./test.sh before_script: - sudo apt-get install zsh diff --git a/Rakefile b/Rakefile deleted file mode 100644 index 6fb0e8b..0000000 --- a/Rakefile +++ /dev/null @@ -1,15 +0,0 @@ -require 'rake' - -desc "Run shUnit2 tests" -task :test do - Dir.glob("test/**/*_test.sh").each do |test| - ["bash", "zsh"].each do |shell| - puts "== Running tests with [#{shell}]: #{test}" - @failed = !system("#{shell} #{test}") || @failed - end - end - exit @failed ? 1 : 0 -end - -task :default => ['test'] - diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..fff4438 --- /dev/null +++ b/test.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# Run SCM Breeze shUnit2 tests + +failed=false + +for test in $(find test/lib -name *_test.sh); do + for shell in bash zsh; do + echo "== Running tests with [$shell]: $test" + $shell $test || failed=true + done +done + +if [ "$failed" = "true" ]; then + echo "Tests failed!" + return 1; +else + echo "All tests passed!" + return 0; +fi \ No newline at end of file