From: Tim Keith Date: Thu, 28 Feb 2019 19:05:49 +0000 (-0800) Subject: [flang] Fix bug in test_modfile.sh X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef5499fd749354d7127fc27c273998de5289008d;p=platform%2Fupstream%2Fllvm.git [flang] Fix bug in test_modfile.sh The expected mod files specified in the test do not necessarily appear in sorted order, and the desired order depends on what the `comm` command expects. So sort them to be sure it is right. Original-commit: flang-compiler/f18@730d0d0562dd0a4eabfde020fef9fe371d401ff5 Reviewed-on: https://github.com/flang-compiler/f18/pull/309 --- diff --git a/flang/test/semantics/test_modfile.sh b/flang/test/semantics/test_modfile.sh index 69ed0f4..939155d 100755 --- a/flang/test/semantics/test_modfile.sh +++ b/flang/test/semantics/test_modfile.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +# Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ for src in "$@"; do $CMD $src ls -1 *.mod | comm -13 prev_files - ) > $actual_files - expected_files=$(sed -n 's/^!Expect: \(.*\)/\1/p' $src) + expected_files=$(sed -n 's/^!Expect: \(.*\)/\1/p' $src | sort) extra_files=$(echo "$expected_files" | comm -23 $actual_files -) if [[ ! -z "$extra_files" ]]; then echo "Unexpected .mod files produced:" $extra_files