X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fbash%2Fentry%2Fcheck%2Fautogen.sh;h=d7cd8e0dbd34a57f62dae8239212da4fc89f08bb;hp=0164b65962b70bb404754b7643be3577f9f9e314;hb=33bc5d2fd8af4e6d397b06e29a30fa5556ae3490;hpb=5e6145a4260ffce1c302e94b9b241851f90838e1 diff --git a/resources/libraries/bash/entry/check/autogen.sh b/resources/libraries/bash/entry/check/autogen.sh index 0164b65962..d7cd8e0dbd 100644 --- a/resources/libraries/bash/entry/check/autogen.sh +++ b/resources/libraries/bash/entry/check/autogen.sh @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2021 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -50,10 +50,11 @@ cp -rf "${CSIT_DIR}/tests"/* "${GENERATED_DIR}/tests_tmp"/ # I think archiving the diff is enough. diff_cmd=("diff" "-dur" "${GENERATED_DIR}/tests_tmp" "${GENERATED_DIR}/tests") -lines="$("${diff_cmd[@]}" | tee "autogen.log" | wc -l)" || die +# Diff returns RC=1 if output is nonzero. +lines="$("${diff_cmd[@]}" | tee "autogen.log" | wc -l || true)" if [ "${lines}" != "0" ]; then # TODO: Decide which text goes to stdout and which to stderr. - warn "Autogen conflict diff nonzero lines: ${lines}" + warn "Autogen conflict, diff sees nonzero lines: ${lines}" # TODO: Disable if output size does more harm than good. cat "autogen.log" >&2 warn