]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgo/misc/cgo/testgodefs/test.bash
Add error check on return value of build_co_await
[thirdparty/gcc.git] / libgo / misc / cgo / testgodefs / test.bash
CommitLineData
93661575
ILT
1#!/usr/bin/env bash
2
3# Copyright 2014 The Go Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style
5# license that can be found in the LICENSE file.
6
7# We are testing cgo -godefs, which translates Go files that use
8# import "C" into Go files with Go definitions of types defined in the
9# import "C" block. Add more tests here.
dd931d9b 10FILE_PREFIXES="anonunion issue8478 fieldtypedef"
93661575 11
aa8901e9
ILT
12cd testdata
13
93661575
ILT
14RM=
15for FP in $FILE_PREFIXES
16do
17 go tool cgo -godefs -srcdir . ${FP}.go > ${FP}_defs.go
18 RM="${RM} ${FP}_defs.go"
19done
20
aa8901e9 21go build -o testgodefs . && ./testgodefs
93661575
ILT
22EXIT=$?
23rm -rf _obj testgodefs ${RM}
24exit $EXIT