github.com/miolini/go@v0.0.0-20160405192216-fca68c8cb408/misc/cgo/fortran/test.bash (about)

     1  #!/usr/bin/env bash
     2  # Copyright 2016 The Go Authors. All rights reserved.
     3  # Use of this source code is governed by a BSD-style
     4  # license that can be found in the LICENSE file.
     5  
     6  # This directory is intended to test the use of Fortran with cgo.
     7  
     8  set -e
     9  
    10  FC=$1
    11  
    12  if ! $FC helloworld/helloworld.f90 -o main.exe >& /dev/null; then
    13    echo "skipping Fortran test: could not build helloworld.f90 with $FC"
    14    exit 0
    15  fi
    16  rm -f main.exe
    17  
    18  if ! go test; then
    19    echo "FAIL: go test"
    20    status=1
    21  fi
    22  
    23  exit $status