1 # Common functionality for test scripts
2 # Process arguments, expecting source file as 1st; optional path to f18 as 2nd
3 # Set: $FLANG_FC1 to the path to the Flang frontend driver with options; $temp
4 # to an empty temp directory; and $src to the full path of the single source
8 echo "$(basename $0): $*" >&2
12 echo "Usage: $(basename $0) <fortran-source> <temp test dir> <f18-command>"
18 (*) src
="$(dirname $0)/$1" ;;
25 [[ ! -f $1 ]] && die
"f18 executable not found: $1"