Skip to content
Snippets Groups Projects
Commit 4f06a0d8 authored by Friedel Ziegelmayer's avatar Friedel Ziegelmayer
Browse files

Start fixing appveyor


License: MIT
Signed-off-by: default avatardignifiedquire <dignifiedquire@gmail.com>
parent b1e642a0
No related branches found
No related tags found
No related merge requests found
# 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
#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:
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
- rmdir c:\go /s /q
- appveyor DownloadFile https://storage.googleapis.com/golang/go1.5.1.windows-amd64.msi
- msiexec /i go1.5.1.windows-amd64.msi /q
# 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:
- make install
- '%BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make nofuse"'
test_script:
- make $TEST_SUITE
- '%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"
)
var setupOpt = func(cmd *exec.Cmd) {}
// GetNumNodes returns the number of testbed nodes configured in the testbed directory
func GetNumNodes() int {
for i := 0; i < 2000; i++ {
......@@ -279,7 +281,7 @@ func IpfsStart(waitall bool) error {
cmd.Dir = dir
cmd.Env = envForDaemon(i)
cmd.SysProcAttr = &syscall.SysProcAttr{Setsid: true}
setupOpt(cmd)
stdout, err := os.Create(path.Join(dir, "daemon.stdout"))
if err != nil {
......@@ -602,6 +604,11 @@ func main() {
kingpin.Arg("args", "arguments").StringsVar(&args)
kingpin.Parse()
if len(args) == 0 {
kingpin.Usage()
return
}
switch args[0] {
case "init":
if cfg.Count == 0 {
......
// +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
# 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
# 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
# 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 "Please check test and ipfs tool installation."
exit 1
......@@ -361,4 +362,3 @@ test_check_peerid() {
return 1
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment