diff options
author | Vratko Polak <vrpolak@cisco.com> | 2020-03-02 17:26:19 +0100 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2020-03-02 17:26:19 +0100 |
commit | daafac3521f8f7ce815b4d258f9c8c42796b0091 (patch) | |
tree | 9ad7aa20cef4cae082db172d37ad39ef3055942d /resources/libraries/bash/entry/check/autogen.sh | |
parent | 4a9ea7c647264779f7919a77fab042a21c312450 (diff) |
Backport tox checkers from master
Change-Id: Ide532cd216b6b8026f9a803b1801b77c471f17b0
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/bash/entry/check/autogen.sh')
-rw-r--r-- | resources/libraries/bash/entry/check/autogen.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/resources/libraries/bash/entry/check/autogen.sh b/resources/libraries/bash/entry/check/autogen.sh index 0164b65962..686d9d7566 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) 2020 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, so we do not die on the next line. +lines="$("${diff_cmd[@]}" | tee "autogen.log" | wc -l)" 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 |