Only run tests with --profile when using MRI.
This commit is contained in:
parent
aeca7a195e
commit
6f5ad2530e
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
# -----------------------------------------------------------------------------
|
||||
# If you send us a ruby then we use that, if you do not then we test with
|
||||
# whatever we can detect, this way you can run both suites when you test out
|
||||
# your source, we expect full coverage now, not just MRI.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
rubies=()
|
||||
for r in jruby ruby; do
|
||||
if which "$r" > /dev/null 2>&1
|
||||
then
|
||||
echo $r
|
||||
fi
|
||||
done
|
22
script/test
22
script/test
|
@ -31,26 +31,26 @@ then
|
|||
|
||||
shift
|
||||
else
|
||||
rubies=()
|
||||
for r in jruby ruby; do
|
||||
if which "$r"
|
||||
then
|
||||
rubies+=(
|
||||
$r
|
||||
)
|
||||
fi
|
||||
done
|
||||
rubies=($(script/rubies))
|
||||
fi
|
||||
|
||||
|
||||
for ruby in $rubies; do
|
||||
if [[ "$ruby" == "jruby" ]]
|
||||
then
|
||||
testopts=""
|
||||
else
|
||||
testopts="--profile"
|
||||
fi
|
||||
|
||||
if [[ $# -lt 1 ]]
|
||||
then
|
||||
set -x
|
||||
time $ruby -S bundle exec \
|
||||
rake TESTOPTS='--profile' test
|
||||
rake TESTOPTS=$testopts test
|
||||
else
|
||||
set -x
|
||||
time $ruby -S bundle exec ruby -Itest \
|
||||
"$@" --profile
|
||||
"$@" $testops
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue