Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
6430f46e
Commit
6430f46e
authored
Sep 15, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/build: fix build (revert test changes)
R=adg TBR=adg CC=golang-dev
https://golang.org/cl/5024046
parent
17bebd3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
18 deletions
+5
-18
src/pkg/go/build/build_test.go
src/pkg/go/build/build_test.go
+5
-15
src/pkg/go/build/cgotest/cgotest.go
src/pkg/go/build/cgotest/cgotest.go
+0
-3
No files found.
src/pkg/go/build/build_test.go
View file @
6430f46e
...
...
@@ -45,12 +45,10 @@ var buildPkgs = []struct {
{
"go/build/cgotest"
,
&
DirInfo
{
CgoFiles
:
[]
string
{
"cgotest.go"
},
CFiles
:
[]
string
{
"cgotest.c"
},
Imports
:
[]
string
{
"C"
,
"unsafe"
},
Package
:
"cgotest"
,
CgoLDFLAGS
:
[]
string
{
"-lregexp"
},
CgoPkgConfig
:
[]
string
{
"cairo"
,
"moscow"
},
CgoFiles
:
[]
string
{
"cgotest.go"
},
CFiles
:
[]
string
{
"cgotest.c"
},
Imports
:
[]
string
{
"C"
,
"unsafe"
},
Package
:
"cgotest"
,
},
},
}
...
...
@@ -58,11 +56,10 @@ var buildPkgs = []struct {
const
cmdtestOutput
=
"3"
func
TestBuild
(
t
*
testing
.
T
)
{
var
ctxt
=
Context
{
GOOS
:
"darwin"
,
GOARCH
:
"amd64"
}
for
_
,
tt
:=
range
buildPkgs
{
tree
:=
Path
[
0
]
// Goroot
dir
:=
filepath
.
Join
(
tree
.
SrcDir
(),
tt
.
dir
)
info
,
err
:=
ctxt
.
ScanDir
(
dir
)
info
,
err
:=
ScanDir
(
dir
)
if
err
!=
nil
{
t
.
Errorf
(
"ScanDir(%#q): %v"
,
tt
.
dir
,
err
)
continue
...
...
@@ -72,13 +69,6 @@ func TestBuild(t *testing.T) {
continue
}
if
tt
.
dir
==
"go/build/cgotest"
{
// Don't actually run cgo.
// Among other things our test depends
// on pkg-config, which is not present on all systems.
continue
}
s
,
err
:=
Build
(
tree
,
tt
.
dir
,
info
)
if
err
!=
nil
{
t
.
Errorf
(
"Build(%#q): %v"
,
tt
.
dir
,
err
)
...
...
src/pkg/go/build/cgotest/cgotest.go
View file @
6430f46e
...
...
@@ -6,9 +6,6 @@ package cgotest
/*
char* greeting = "hello, world";
#cgo darwin/amd64 LDFLAGS: -lregexp
#cgo linux CFLAGS: -m32
#cgo pkg-config: cairo moscow
*/
// #include "cgotest.h"
import
"C"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment