Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang] Improvements to semantics tests
Change test scripts so that cmake passes in the path to the `f18` that it just built. They no longer have to use relative paths. Simplify argument passing in test scripts by sharing it in `common.sh`. Move `if_arith01.f90`, `if_construct01.f90`, `if_stmt01.f90` to `ERROR_TESTS`. As it was, nothing was being tested on them. For `test_error.sh`, find the include directory relative to `f18` and pass that in with a `-I` option. Eliminate the temporary definitions of `iso_fortran_env`, `iso_c_binding`, `ieee_exceptions` in the tests because the "real" ones are now available. The tests that are run with `test_any.sh` could probably have similar changes, but they are not part of this commit. Original-commit: flang-compiler/f18@b62fe48 Reviewed-on: flang-compiler/f18#568
- Loading branch information
Showing
10 changed files
with
70 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# 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. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Common functionality for test scripts | ||
# Process arguments, expecting source file as 1st; optional path to f18 as 2nd | ||
# Set: $F18 to the path to f18; $temp to an empty temp directory; and $src | ||
# to the full path of the single source argument | ||
|
||
PATH=/usr/bin:/bin | ||
|
||
function die { | ||
echo "$(basename $0): $*" >&2 | ||
exit 1 | ||
} | ||
|
||
case $# in | ||
(1) ;; | ||
(2) F18=$2 ;; | ||
(*) echo "Usage: $(basename $0) <fortran-source> [<f18-executable>]"; exit 1 | ||
esac | ||
[[ -z ${F18+x} ]] && die "Path to f18 must be second argument or in F18 environment variable" | ||
[[ ! -f $F18 ]] && die "f18 executable not found: $F18" | ||
case $1 in | ||
(/*) src=$1 ;; | ||
(*) src=$(dirname $0)/$1 ;; | ||
esac | ||
temp=`mktemp -d ./tmp.XXXXXX` | ||
[[ $KEEP ]] || trap "rm -rf $temp" EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters