forked from ruboto/ruboto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_jruby.sh
executable file
·83 lines (64 loc) · 2.03 KB
/
test_jruby.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
# This script can be run with "git bisect run" to determine which JRuby commit broke the tests.
# Change the test run at the bottom to narrow down the test and make it faster.
# cd ../jruby
# git bisect start
# git bisect good `git rev-list -n 1 --before="2011-10-27 13:37" master`
# git bisect bad HEAD
# git bisect run ../ruboto/test_jruby.sh
# When you are finished run
# git bisect reset
JRUBY_HOME=`pwd`
RUBOTO_HOME=`dirname $0`
if [ ! -e "LICENSE.RUBY" ] ; then
echo "You must cd to the jruby working copy before running this script."
exit 1
fi
echo Remaining suspects: `git bisect view | grep "Date:" | wc -l`
ant clean-all dist-gem
build_status=$?
# Only needed to bisect source older than JRuby 1.7.0.rc1
if [ $build_status -ne 0 ] ; then
echo Build failed. Trying older ANT target.
ant clean-all dist-jar-complete
if [ $? -eq 0 ] ; then
bin/rake gem
fi
build_status=$?
fi
rm lib/native/Darwin/libjruby-cext.jnilib
git checkout .
git checkout lib/native/Darwin/libjruby-cext.jnilib
if [ $build_status -eq 0 ] ; then
echo Build OK.
else
echo "Build failed, skipping revision"
exit 125
fi
set -e
cd $RUBOTO_HOME
export GEM_HOME=$RUBOTO_HOME/tmp/gems
export GEM_PATH=$GEM_HOME
unset JRUBY_JARS_VERSION # The version may vary across revisions
export RUBOTO_PLATFORM=FROM_GEM # Avoid the CURRENT setting since it ignores our GEM
bundle install
gem uninstall jruby-jars --all
gem install -l $JRUBY_HOME/dist/jruby-jars-*.gem
rm -rf tmp/Ruboto*
set +e
./matrix_tests.sh
# ./run_tests.sh
# ruby test/broadcast_receiver_test.rb -n test_generated_broadcast_receiver
# ACTIVITY_TEST_PATTERN=subclass ruby test/ruboto_gen_test.rb -n test_activity_tests
# ruby test/ruboto_gen_test.rb -n test_block_def_activity_tests
test_status=$?
echo
echo "********************************************************************************"
if [ $test_status -eq 0 ] ; then
echo Bisect GOOD.
else
echo Bisect BAD.
fi
echo "********************************************************************************"
echo
exit $test_status