From ef5499fd749354d7127fc27c273998de5289008d Mon Sep 17 00:00:00 2001 From: Tim Keith Date: Thu, 28 Feb 2019 11:05:49 -0800 Subject: [PATCH] [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 --- flang/test/semantics/test_modfile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.7.4