]>
Commit | Line | Data |
---|---|---|
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 | 10 | FILE_PREFIXES="anonunion issue8478 fieldtypedef" |
93661575 | 11 | |
aa8901e9 ILT |
12 | cd testdata |
13 | ||
93661575 ILT |
14 | RM= |
15 | for FP in $FILE_PREFIXES | |
16 | do | |
17 | go tool cgo -godefs -srcdir . ${FP}.go > ${FP}_defs.go | |
18 | RM="${RM} ${FP}_defs.go" | |
19 | done | |
20 | ||
aa8901e9 | 21 | go build -o testgodefs . && ./testgodefs |
93661575 ILT |
22 | EXIT=$? |
23 | rm -rf _obj testgodefs ${RM} | |
24 | exit $EXIT |