From: Thanh Ha Date: Tue, 6 Feb 2018 16:36:31 +0000 (-0500) Subject: Add test to check for double curly braces X-Git-Tag: v0.16.0~6 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=8ec975845840601c3b2a1015bf56a25ad9532234;p=releng%2Fglobal-jjb.git Add test to check for double curly braces This will cause the build to fail if double curly braces are in JJB output XML. This should help catch the JJB bug that adds curly braces when using !include-raw-escape. Issue: RELENG-777 Change-Id: Iaf9a9ef695229fa24dfc639ca60a4b9a9928a234 Signed-off-by: Thanh Ha --- diff --git a/jjb-compare-xml.sh b/jjb-compare-xml.sh index e29c1fa3..740daf36 100755 --- a/jjb-compare-xml.sh +++ b/jjb-compare-xml.sh @@ -42,6 +42,16 @@ for xml in "$test_dir"/*; do fi done +echo "Checking for double curly braces..." +mapfile -t xml_files < <(find "$test_dir" -type f) +for xml in "${xml_files[@]}"; do + if grep '{{' "$xml"; then + echo "ERROR: Double curly braces discovered in output XML." + exit 1 + fi +done +echo "No double curly braces found." + # Cleanup rm -rf "$test_dir" "$expected_xml_dir"