Commit 89913b1f2357827cebdbef60422cf0747c4ec454

Authored by Antonio Terceiro
1 parent f3335e10

Better test task

Showing 2 changed files with 16 additions and 3 deletions   Show diff stats
Rakefile
1 1 require 'chake'
2 2  
3 3 task :test do
4   - Dir.glob('test/*_test.sh').each do |t|
5   - sh 'sh', t
6   - end
  4 + sh './test/run_all'
7 5 end
8 6  
9 7 task :default => :test
... ...
test/run_all 0 → 100755
... ... @@ -0,0 +1,15 @@
  1 +#!/bin/sh
  2 +
  3 +set -e
  4 +
  5 +failed=0
  6 +for file in test/*_test.sh; do
  7 + rc=0
  8 + echo "$file"
  9 + mispipe "sh $file" "sed -e 's/^/ /'" || rc=$?
  10 + if [ $rc -ne 0 ]; then
  11 + failed=1
  12 + fi
  13 +done
  14 +
  15 +exit $failed
... ...