Fix ABI diff reporting with dist
When we're doing ABI diffing, we run something like:
(run-abi-diff) || (echo && exit 1)
When `dist` is added, we attempt to copy out the result:
(run-abi-diff) || (echo) && (copy && exit 1)
But this always fails, since it will always run exit 1. We really want
the parenthesis around the entire second section. This change switches
it to:
(run-abi-diff) || (echo && (copy) && exit 1)
This matches the behavior before Iae25374fe937a0cbe8a8ddf9e23c3bc1f62bbb2a
Test: treehugger on P
Change-Id: Ic39da4d4630ee950b811ec7854d55d65c52f8661
diff --git a/cc/builder.go b/cc/builder.go
index a88df88..cec0056 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -205,7 +205,7 @@
distAbiDiffDir := android.PathForDist(ctx, "abidiffs")
commandStr += "|| (echo ' ---- Please update abi references by running platform/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l ${libName} ----'"
if distAbiDiffDir.Valid() {
- commandStr += ") && (mkdir -p " + distAbiDiffDir.String() + " && cp ${out} " + distAbiDiffDir.String()
+ commandStr += " && (mkdir -p " + distAbiDiffDir.String() + " && cp ${out} " + distAbiDiffDir.String() + ")"
}
commandStr += " && exit 1)"
return blueprint.RuleParams{