Use test.sh script to run tests, because Ruby processes run really slow when started from a Rake task
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
|
script: ./test.sh
|
||||||
before_script:
|
before_script:
|
||||||
- sudo apt-get install zsh
|
- sudo apt-get install zsh
|
||||||
|
|||||||
15
Rakefile
15
Rakefile
@@ -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']
|
|
||||||
|
|
||||||
19
test.sh
Executable file
19
test.sh
Executable file
@@ -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
|
||||||
Reference in New Issue
Block a user