File: run.sh

package info (click to toggle)
ruby-nokogiri 1.11.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,576 kB
  • sloc: xml: 28,086; ruby: 18,456; java: 13,067; ansic: 5,138; yacc: 265; sh: 208; makefile: 27
file content (40 lines) | stat: -rwxr-xr-x 888 bytes parent folder | download
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
#! /usr/bin/env bash

test -e /etc/os-release && cat /etc/os-release

set -e -x -u

source "$(dirname "$0")/../../shared/code-climate.sh"

VERSION_INFO=$(ruby -v)
RUBY_ENGINE=$(cut -d" " -f1 <<< "${VERSION_INFO}")
RUBY_VERSION=$(cut -d" " -f2 <<< "${VERSION_INFO}")

pushd nokogiri

  test_task="test"

  bundle install --local || bundle install

  if [[ "${TEST_WITH_SYSTEM_LIBRARIES:-}" == "t" ]] ; then
    export NOKOGIRI_USE_SYSTEM_LIBRARIES=t
  fi

  if [[ "${TEST_WITH_VALGRIND:-}" == "t" ]] ; then
    test_task="test:valgrind" # override
    # export TESTOPTS="-v" # see more verbose output to help narrow down warnings

    # always use the CI suppressions if they exist
    if [[ -d ../ci/suppressions ]] ; then
      rm -rf suppressions
      cp -var ../ci/suppressions .
    fi
  fi

  code-climate-setup

  bundle exec rake compile ${test_task}

  code-climate-shipit

popd