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
|
shift
|
||||||
else
|
else
|
||||||
rubies=()
|
rubies=($(script/rubies))
|
||||||
for r in jruby ruby; do
|
|
||||||
if which "$r"
|
|
||||||
then
|
|
||||||
rubies+=(
|
|
||||||
$r
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
for ruby in $rubies; do
|
for ruby in $rubies; do
|
||||||
|
if [[ "$ruby" == "jruby" ]]
|
||||||
|
then
|
||||||
|
testopts=""
|
||||||
|
else
|
||||||
|
testopts="--profile"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $# -lt 1 ]]
|
if [[ $# -lt 1 ]]
|
||||||
then
|
then
|
||||||
set -x
|
set -x
|
||||||
time $ruby -S bundle exec \
|
time $ruby -S bundle exec \
|
||||||
rake TESTOPTS='--profile' test
|
rake TESTOPTS=$testopts test
|
||||||
else
|
else
|
||||||
set -x
|
set -x
|
||||||
time $ruby -S bundle exec ruby -Itest \
|
time $ruby -S bundle exec ruby -Itest \
|
||||||
"$@" --profile
|
"$@" $testops
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue