mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-30 01:52:26 +08:00
49
appveyor.yml
Normal file
49
appveyor.yml
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# Notes:
|
||||||
|
# - Minimal appveyor.yml file is an empty file. All sections are optional.
|
||||||
|
# - Indent each level of configuration with 2 spaces. Do not use tabs!
|
||||||
|
# - All section names are case-sensitive.
|
||||||
|
# - Section names should be unique on each level.
|
||||||
|
|
||||||
|
version: "{build}"
|
||||||
|
|
||||||
|
os: Windows Server 2012 R2
|
||||||
|
|
||||||
|
clone_folder: c:\go\src\github.com\ipfs\go-ipfs
|
||||||
|
|
||||||
|
environment:
|
||||||
|
GOPATH: c:\gopath
|
||||||
|
#TEST_NO_FUSE: 1
|
||||||
|
#TEST_VERBOSE: 1
|
||||||
|
#TEST_SUITE: test_sharness_expensive
|
||||||
|
#GOFLAGS: -tags nofuse
|
||||||
|
global:
|
||||||
|
BASH: C:\cygwin\bin\bash
|
||||||
|
matrix:
|
||||||
|
- GOARCH: amd64
|
||||||
|
GOVERSION: 1.5.1
|
||||||
|
GOROOT: c:\go
|
||||||
|
DOWNLOADPLATFORM: "x64"
|
||||||
|
|
||||||
|
install:
|
||||||
|
# Enable make
|
||||||
|
#- SET PATH=c:\MinGW\bin;%PATH%
|
||||||
|
#- copy c:\MinGW\bin\mingw32-make.exe c:\MinGW\bin\make.exe
|
||||||
|
- go version
|
||||||
|
- go env
|
||||||
|
|
||||||
|
# Cygwin build script
|
||||||
|
#
|
||||||
|
# NOTES:
|
||||||
|
#
|
||||||
|
# The stdin/stdout file descriptor appears not to be valid for the Appveyor
|
||||||
|
# build which causes failures as certain functions attempt to redirect
|
||||||
|
# default file handles. Ensure a dummy file descriptor is opened with 'exec'.
|
||||||
|
#
|
||||||
|
build_script:
|
||||||
|
- '%BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make nofuse"'
|
||||||
|
|
||||||
|
test_script:
|
||||||
|
- '%BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; export GOFLAGS=''-tags nofuse''; export TEST_NO_FUSE=1; export TEST_VERBOSE=1; export TEST_SUITE=test_sharness_expensive; make $TEST_SUITE"'
|
||||||
|
|
||||||
|
build:
|
||||||
|
parallel: true
|
@ -23,6 +23,8 @@ import (
|
|||||||
manet "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net"
|
manet "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var setupOpt = func(cmd *exec.Cmd) {}
|
||||||
|
|
||||||
// GetNumNodes returns the number of testbed nodes configured in the testbed directory
|
// GetNumNodes returns the number of testbed nodes configured in the testbed directory
|
||||||
func GetNumNodes() int {
|
func GetNumNodes() int {
|
||||||
for i := 0; i < 2000; i++ {
|
for i := 0; i < 2000; i++ {
|
||||||
@ -279,7 +281,7 @@ func IpfsStart(waitall bool) error {
|
|||||||
cmd.Dir = dir
|
cmd.Dir = dir
|
||||||
cmd.Env = envForDaemon(i)
|
cmd.Env = envForDaemon(i)
|
||||||
|
|
||||||
cmd.SysProcAttr = &syscall.SysProcAttr{Setsid: true}
|
setupOpt(cmd)
|
||||||
|
|
||||||
stdout, err := os.Create(path.Join(dir, "daemon.stdout"))
|
stdout, err := os.Create(path.Join(dir, "daemon.stdout"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -602,6 +604,11 @@ func main() {
|
|||||||
kingpin.Arg("args", "arguments").StringsVar(&args)
|
kingpin.Arg("args", "arguments").StringsVar(&args)
|
||||||
kingpin.Parse()
|
kingpin.Parse()
|
||||||
|
|
||||||
|
if len(args) == 0 {
|
||||||
|
kingpin.Usage()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
switch args[0] {
|
switch args[0] {
|
||||||
case "init":
|
case "init":
|
||||||
if cfg.Count == 0 {
|
if cfg.Count == 0 {
|
||||||
|
14
test/dependencies/iptb/proc_unix.go
Normal file
14
test/dependencies/iptb/proc_unix.go
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
// +build !windows
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"os/exec"
|
||||||
|
"syscall"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
setupOpt = func(cmd *exec.Cmd) {
|
||||||
|
cmd.SysProcAttr = &syscall.SysProcAttr{Setsid: true}
|
||||||
|
}
|
||||||
|
}
|
@ -9,7 +9,8 @@
|
|||||||
# use the ipfs tool to test against
|
# use the ipfs tool to test against
|
||||||
|
|
||||||
# add current directory to path, for ipfs tool.
|
# add current directory to path, for ipfs tool.
|
||||||
PATH=$(pwd)/bin:${PATH}
|
BIN=$(cd .. && echo `pwd`/bin)
|
||||||
|
PATH=${BIN}:${PATH}
|
||||||
|
|
||||||
# set sharness verbosity. we set the env var directly as
|
# set sharness verbosity. we set the env var directly as
|
||||||
# it's too late to pass in --verbose, and --verbose is harder
|
# it's too late to pass in --verbose, and --verbose is harder
|
||||||
@ -17,7 +18,7 @@ PATH=$(pwd)/bin:${PATH}
|
|||||||
test "$TEST_VERBOSE" = 1 && verbose=t
|
test "$TEST_VERBOSE" = 1 && verbose=t
|
||||||
|
|
||||||
# assert the `ipfs` we're using is the right one.
|
# assert the `ipfs` we're using is the right one.
|
||||||
if test `which ipfs` != $(pwd)/bin/ipfs; then
|
if test `which ipfs` != ${BIN}/ipfs; then
|
||||||
echo >&2 "Cannot find the tests' local ipfs tool."
|
echo >&2 "Cannot find the tests' local ipfs tool."
|
||||||
echo >&2 "Please check test and ipfs tool installation."
|
echo >&2 "Please check test and ipfs tool installation."
|
||||||
exit 1
|
exit 1
|
||||||
@ -361,4 +362,3 @@ test_check_peerid() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user