forked from kaitai-io/kaitai_struct_tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci-ruby
executable file
·19 lines (16 loc) · 789 Bytes
/
ci-ruby
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
. ./config
mkdir -p "$TEST_OUT_DIR/ruby"
rspec -I compiled/ruby -I "$RUBY_RUNTIME_DIR" -f json --out "$TEST_OUT_DIR/ruby/test-output-ruby.json" spec/ruby
# In Travis, we'll be running different (probably old and obsolete) version of Ruby at this point,
# so we'll need to make sure we explicitly run system Ruby.
if [ -n "$TRAVIS" ]; then
echo 'Running in Travis, running system Ruby explicitly.'
/usr/bin/ruby --version
/usr/bin/ruby ./kst-adoption-report ruby
/usr/bin/ruby aggregate/convert_to_json ruby "$TEST_OUT_DIR/ruby" "$TEST_OUT_DIR/ruby/ci.json"
else
# This one will run Ruby through shebang, which would use /usr/bin/env to find `ruby` in $PATH.
./kst-adoption-report ruby
aggregate/convert_to_json ruby "$TEST_OUT_DIR/ruby" "$TEST_OUT_DIR/ruby/ci.json"
fi