Skip to content

Commit 031b33b

Browse files
authored
Filter non-v_noabi namespaces in unstable reports (#1458)
1 parent ce8f7df commit 031b33b

File tree

1 file changed

+46
-17
lines changed

1 file changed

+46
-17
lines changed

.evergreen/scripts/abi-compliance-check-test.sh

Lines changed: 46 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ if true; then
3737
../install/old/include/
3838
</add_include_paths>
3939
40+
<skip_including>
41+
/v_noabi/bsoncxx/enums/
42+
/v_noabi/bsoncxx/config/
43+
/v_noabi/mongocxx/config/
44+
/v1/detail/prelude.hpp
45+
/v1/detail/postlude.hpp
46+
</skip_including>
47+
4048
DOC
4149

4250
cat >new.xml <<DOC
@@ -52,10 +60,6 @@ DOC
5260
../install/new/include/
5361
</add_include_paths>
5462
55-
DOC
56-
57-
{
58-
cat <<DOC
5963
<skip_including>
6064
/v_noabi/bsoncxx/enums/
6165
/v_noabi/bsoncxx/config/
@@ -64,12 +68,7 @@ DOC
6468
/v1/detail/postlude.hpp
6569
</skip_including>
6670
67-
<skip_namespaces>
68-
detail
69-
</skip_namespaces>
70-
7171
DOC
72-
} | tee -a old.xml new.xml >/dev/null
7372

7473
tee cxx-abi/old.xml cxx-noabi/old.xml <old.xml >/dev/null
7574
tee cxx-abi/new.xml cxx-noabi/new.xml <new.xml >/dev/null
@@ -87,13 +86,11 @@ if true; then
8786
<skip_headers>
8887
/v_noabi/
8988
</skip_headers>
90-
DOC
9189
92-
cat >>cxx-noabi/old.xml <<DOC
93-
<headers>
94-
../install/old/include/bsoncxx/v_noabi
95-
../install/old/include/mongocxx/v_noabi
96-
</headers>
90+
<skip_namespaces>
91+
bsoncxx::detail
92+
mongocxx::detail
93+
</skip_namespaces>
9794
DOC
9895

9996
cat >>cxx-abi/new.xml <<DOC
@@ -105,21 +102,53 @@ DOC
105102
<skip_headers>
106103
/v_noabi/
107104
</skip_headers>
105+
106+
<skip_namespaces>
107+
bsoncxx::detail
108+
mongocxx::detail
109+
</skip_headers>
110+
DOC
111+
112+
cat >>cxx-noabi/old.xml <<DOC
113+
<headers>
114+
../install/old/include/bsoncxx/v_noabi
115+
../install/old/include/mongocxx/v_noabi
116+
</headers>
117+
118+
<skip_namespaces>
119+
bsoncxx::detail
120+
mongocxx::detail
121+
bsoncxx::v1
122+
mongocxx::v1
123+
</skip_namespaces>
108124
DOC
109125

110126
cat >>cxx-noabi/new.xml <<DOC
111127
<headers>
112128
../install/new/include/bsoncxx/v_noabi
113129
../install/new/include/mongocxx/v_noabi
114130
</headers>
131+
132+
<skip_namespaces>
133+
bsoncxx::detail
134+
mongocxx::detail
135+
bsoncxx::v1
136+
mongocxx::v1
137+
</skip_namespaces>
115138
DOC
116139
fi
117140

141+
args=(
142+
-lib mongo-cxx-driver
143+
-old old.xml
144+
-new new.xml
145+
)
146+
118147
# Allow task to upload the HTML report despite failed status.
119148
echo "Generating stable ABI report..."
120149
pushd cxx-abi
121150
declare ret
122-
abi-compliance-checker -lib mongo-cxx-driver -old old.xml -new new.xml 2>&1 && ret="$?" || ret="$?"
151+
abi-compliance-checker "${args[@]}" 2>&1 && ret="$?" || ret="$?"
123152
if [[ "${ret:?}" -gt 1 ]]; then
124153
declare status
125154
status='{"status":"failed", "type":"test", "should_continue":true, "desc":"abi-compliance-checker emitted one or more errors"}'
@@ -136,7 +165,7 @@ echo "Generating stable ABI report... done."
136165
echo "Generating unstable ABI report..."
137166
pushd cxx-noabi
138167
declare ret
139-
abi-compliance-checker -lib mongo-cxx-driver -old old.xml -new new.xml 2>&1 && ret="$?" || ret="$?"
168+
abi-compliance-checker "${args[@]}" 2>&1 && ret="$?" || ret="$?"
140169
if [[ "${ret:?}" -gt 1 ]]; then
141170
declare status
142171
status='{"status":"failed", "type":"test", "should_continue":true, "desc":"abi-compliance-checker emitted one or more errors"}'

0 commit comments

Comments
 (0)