Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
54fcab20
Unverified
Commit
54fcab20
authored
8 years ago
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appveyor, build: fix review requests
parent
a2bc90d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
25 deletions
+31
-25
appveyor.yml
appveyor.yml
+1
-1
ci.go
build/ci.go
+30
-24
No files found.
appveyor.yml
View file @
54fcab20
...
...
@@ -36,4 +36,4 @@ after_build:
test_script
:
-
set CGO_ENABLED=1
-
go run build\ci.go test -vet -coverage
-misspell
-
go run build\ci.go test -vet -coverage
This diff is collapsed.
Click to expand it.
build/ci.go
View file @
54fcab20
...
...
@@ -24,7 +24,7 @@ Usage: go run ci.go <command> <command flags/arguments>
Available commands are:
install [-arch architecture] [ packages... ] -- builds packages and executables
test [ -coverage ] [ -vet ] [ -misspell
] [ packages... ]
-- runs the tests
test [ -coverage ] [ -vet ] [ -misspell
] [ packages... ]
-- runs the tests
archive [-arch architecture] [ -type zip|tar ] [ -signer key-envvar ] [ -upload dest ] -- archives build artefacts
importkeys -- imports signing keys from env
debsrc [ -signer key-id ] [ -upload dest ] -- creates a debian source package
...
...
@@ -289,29 +289,7 @@ func doTest(cmdline []string) {
build
.
MustRun
(
goTool
(
"vet"
,
packages
...
))
}
if
*
misspell
{
// Ensure the spellchecker is available
build
.
MustRun
(
goTool
(
"get"
,
"github.com/client9/misspell/cmd/misspell"
))
// Windows (AppVeyor) chokes on long argument lists, check packages individualy
for
_
,
pkg
:=
range
packages
{
// The spell checker doesn't work on packages, gather all .go files for it
out
,
err
:=
goTool
(
"list"
,
"-f"
,
"{{.Dir}}{{range .GoFiles}}
\n
{{.}}{{end}}{{range .CgoFiles}}
\n
{{.}}{{end}}{{range .TestGoFiles}}
\n
{{.}}{{end}}"
,
pkg
)
.
CombinedOutput
()
if
err
!=
nil
{
log
.
Fatalf
(
"source file listing failed: %v
\n
%s"
,
err
,
string
(
out
))
}
// Retrieve the folder and assemble the source list
lines
:=
strings
.
Split
(
string
(
out
),
"
\n
"
)
root
:=
lines
[
0
]
sources
:=
make
([]
string
,
0
,
len
(
lines
)
-
1
)
for
_
,
line
:=
range
lines
[
1
:
]
{
if
line
=
strings
.
TrimSpace
(
line
);
line
!=
""
{
sources
=
append
(
sources
,
filepath
.
Join
(
root
,
line
))
}
}
// Run the spell checker for this particular package
build
.
MustRunCommand
(
filepath
.
Join
(
GOBIN
,
"misspell"
),
append
([]
string
{
"-error"
},
sources
...
)
...
)
}
spellcheck
(
packages
)
}
// Run the actual tests.
gotest
:=
goTool
(
"test"
)
...
...
@@ -325,6 +303,34 @@ func doTest(cmdline []string) {
build
.
MustRun
(
gotest
)
}
// spellcheck runs the client9/misspell spellchecker package on all Go, Cgo and
// test files in the requested packages.
func
spellcheck
(
packages
[]
string
)
{
// Ensure the spellchecker is available
build
.
MustRun
(
goTool
(
"get"
,
"github.com/client9/misspell/cmd/misspell"
))
// Windows chokes on long argument lists, check packages individualy
for
_
,
pkg
:=
range
packages
{
// The spell checker doesn't work on packages, gather all .go files for it
out
,
err
:=
goTool
(
"list"
,
"-f"
,
"{{.Dir}}{{range .GoFiles}}
\n
{{.}}{{end}}{{range .CgoFiles}}
\n
{{.}}{{end}}{{range .TestGoFiles}}
\n
{{.}}{{end}}"
,
pkg
)
.
CombinedOutput
()
if
err
!=
nil
{
log
.
Fatalf
(
"source file listing failed: %v
\n
%s"
,
err
,
string
(
out
))
}
// Retrieve the folder and assemble the source list
lines
:=
strings
.
Split
(
string
(
out
),
"
\n
"
)
root
:=
lines
[
0
]
sources
:=
make
([]
string
,
0
,
len
(
lines
)
-
1
)
for
_
,
line
:=
range
lines
[
1
:
]
{
if
line
=
strings
.
TrimSpace
(
line
);
line
!=
""
{
sources
=
append
(
sources
,
filepath
.
Join
(
root
,
line
))
}
}
// Run the spell checker for this particular package
build
.
MustRunCommand
(
filepath
.
Join
(
GOBIN
,
"misspell"
),
append
([]
string
{
"-error"
},
sources
...
)
...
)
}
}
// Release Packaging
func
doArchive
(
cmdline
[]
string
)
{
...
...
This diff is collapsed.
Click to expand it.
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