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
This commit is contained in:
Dan Willemsen
2018-04-17 10:41:11 -07:00
parent 423245dcc3
commit edd1ae0817

View File

@@ -205,7 +205,7 @@ var (
distAbiDiffDir := android.PathForDist(ctx, "abidiffs") 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} ----'" commandStr += "|| (echo ' ---- Please update abi references by running platform/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l ${libName} ----'"
if distAbiDiffDir.Valid() { if distAbiDiffDir.Valid() {
commandStr += ") && (mkdir -p " + distAbiDiffDir.String() + " && cp ${out} " + distAbiDiffDir.String() commandStr += " && (mkdir -p " + distAbiDiffDir.String() + " && cp ${out} " + distAbiDiffDir.String() + ")"
} }
commandStr += " && exit 1)" commandStr += " && exit 1)"
return blueprint.RuleParams{ return blueprint.RuleParams{