Skip to content

Commit 91a63d5

Browse files
committed
add tests for pkg-config failure scenario
due to conflicting gcc CFLAGS, details in #1772 and #1731. added to both master and PR pipelines.
1 parent 254f341 commit 91a63d5

2 files changed

Lines changed: 69 additions & 11 deletions

File tree

concourse/nokogiri.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ groups:
66
- "ruby-<%= ruby_version %>-vendored"
77
- "ruby-<%= ruby_version %>-valgrind"
88
<% end %>
9+
- "ruby-vanilla-system"
910
<% for ruby_version in RUBIES[:mri].last(1) %>
1011
- "ruby-libxmlruby-system"
1112
- "ruby-libxmlruby-vendored"
@@ -33,6 +34,7 @@ groups:
3334
- ruby-<%= RUBIES[:mri].last %>-system-pr
3435
- ruby-<%= RUBIES[:mri].last %>-vendored-pr
3536
- ruby-<%= RUBIES[:mri].last %>-valgrind-pr
37+
- ruby-vanilla-system-pr
3638
- jruby-<%= RUBIES[:jruby].last %>-pr
3739
- rbx-<%= RUBIES[:rbx].last %>-pr
3840
- pr-success
@@ -162,6 +164,29 @@ jobs:
162164
<% end %>
163165

164166
% ruby_version = RUBIES[:mri].last
167+
- name: ruby-vanilla-system
168+
public: true
169+
plan:
170+
- get: ci
171+
- get: nokogiri
172+
trigger: true
173+
passed: ["ruby-<%= ruby_version %>-system"]
174+
- task: rake-test
175+
config:
176+
platform: linux
177+
image_resource:
178+
type: docker-image
179+
source: {repository: ubuntu, tag: xenial}
180+
inputs:
181+
- name: ci
182+
- name: nokogiri
183+
params:
184+
NOKOGIRI_USE_SYSTEM_LIBRARIES: t
185+
TEST_WITH_APT_REPO_RUBY: t
186+
run:
187+
path: ci/concourse/tasks/rake-test/run.sh
188+
on_failure: *notify_failure_to_irc
189+
165190
- name: ruby-libxmlruby-system
166191
public: true
167192
plan:
@@ -433,6 +458,33 @@ jobs:
433458
on_failure: { aggregate: [*notify_failure_to_irc, *notify_failure_to_pr] }
434459
<% end %>
435460

461+
% ruby_version = RUBIES[:mri].last
462+
- name: ruby-vanilla-system-pr
463+
public: true
464+
max_in_flight: 1
465+
plan:
466+
- get: ci
467+
- get: nokogiri-pr
468+
trigger: true
469+
version: every
470+
passed: ["ruby-<%= ruby_version %>-system-pr"]
471+
- task: rake-test
472+
config:
473+
platform: linux
474+
image_resource:
475+
type: docker-image
476+
source: {repository: ubuntu, tag: xenial}
477+
inputs:
478+
- name: ci
479+
- name: nokogiri-pr
480+
path: nokogiri
481+
params:
482+
NOKOGIRI_USE_SYSTEM_LIBRARIES: t
483+
TEST_WITH_APT_REPO_RUBY: t
484+
run:
485+
path: ci/concourse/tasks/rake-test/run.sh
486+
on_failure: { aggregate: [*notify_failure_to_irc, *notify_failure_to_pr] }
487+
436488
% jruby_version = RUBIES[:jruby].last
437489
- name: jruby-<%= jruby_version %>-pr
438490
public: true
@@ -501,6 +553,7 @@ jobs:
501553
- ruby-<%= RUBIES[:mri].last %>-system-pr
502554
- ruby-<%= RUBIES[:mri].last %>-vendored-pr
503555
- ruby-<%= RUBIES[:mri].last %>-valgrind-pr
556+
- ruby-vanilla-system-pr
504557
- jruby-<%= RUBIES[:jruby].last %>-pr
505558
- rbx-<%= RUBIES[:rbx].last %>-pr
506559
- put: nokogiri-pr

concourse/tasks/rake-test/run.sh

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,26 @@
22

33
set -e -x -u
44

5+
APT_UPDATED=false
6+
7+
function ensure-apt-update {
8+
if [[ $APT_UPDATED != "false" ]] ; then
9+
return
10+
fi
11+
12+
apt-get update
13+
APT_UPDATED=true
14+
}
15+
16+
if [[ ${TEST_WITH_APT_REPO_RUBY:-} != "" ]] ; then
17+
ensure-apt-update
18+
apt-get install -y ruby ruby-dev bundler libxslt-dev libxml2-dev pkg-config
19+
fi
20+
521
VERSION_INFO=$(ruby -v)
622
RUBY_ENGINE=$(cut -d" " -f1 <<< "${VERSION_INFO}")
723
RUBY_VERSION=$(cut -d" " -f2 <<< "${VERSION_INFO}")
824

9-
APT_UPDATED=false
10-
1125
FROZEN_STRING_REF="53f9b66"
1226

1327
function mri-24-or-greater {
@@ -36,15 +50,6 @@ function rbx-engine {
3650
return 1
3751
}
3852

39-
function ensure-apt-update {
40-
if [[ $APT_UPDATED != "false" ]] ; then
41-
return
42-
fi
43-
44-
apt-get update
45-
APT_UPDATED=true
46-
}
47-
4853
pushd nokogiri
4954

5055
if rbx-engine ; then

0 commit comments

Comments
 (0)