Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
0311c051
提交
0311c051
authored
1月 14, 2015
作者:
Juan Batiz-Benet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
testing/ci: all env var checks now use new pkgs
Good thing, i checked one wrong, too!
上级
73b3c304
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
23 行增加
和
23 行删除
+23
-23
ipns_test.go
fuse/ipns/ipns_test.go
+5
-9
conn_test.go
p2p/net/conn/conn_test.go
+3
-2
secure_conn_test.go
p2p/net/conn/secure_conn_test.go
+2
-2
dial_test.go
p2p/net/swarm/dial_test.go
+7
-5
fracctx_test.go
util/ctx/fracctx_test.go
+4
-3
ci.go
util/testutil/ci/ci.go
+2
-2
没有找到文件。
fuse/ipns/ipns_test.go
浏览文件 @
0311c051
...
...
@@ -5,24 +5,20 @@ import (
"crypto/rand"
"io/ioutil"
"os"
"strings"
"testing"
"time"
fstest
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/bazil.org/fuse/fs/fstestutil"
core
"github.com/jbenet/go-ipfs/core"
u
"github.com/jbenet/go-ipfs/util"
ci
"github.com/jbenet/go-ipfs/util/testutil/ci"
)
func
maybeSkipFuseTests
(
t
*
testing
.
T
)
bool
{
v
:=
"TEST_NO_FUSE"
n
:=
strings
.
ToLower
(
os
.
Getenv
(
v
))
skip
:=
n
!=
""
&&
n
!=
"false"
&&
n
!=
"f"
if
skip
{
t
.
Skipf
(
"Skipping FUSE tests (%s=%s)"
,
v
,
n
)
func
maybeSkipFuseTests
(
t
*
testing
.
T
)
{
if
ci
.
NoFuse
()
{
t
.
Skip
(
"Skipping FUSE tests"
)
}
return
skip
}
func
randBytes
(
size
int
)
[]
byte
{
...
...
p2p/net/conn/conn_test.go
浏览文件 @
0311c051
...
...
@@ -3,13 +3,14 @@ package conn
import
(
"bytes"
"fmt"
"os"
"runtime"
"sync"
"testing"
"time"
context
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
travis
"github.com/jbenet/go-ipfs/util/testutil/ci/travis"
)
func
testOneSendRecv
(
t
*
testing
.
T
,
c1
,
c2
Conn
)
{
...
...
@@ -62,7 +63,7 @@ func TestCloseLeak(t *testing.T) {
t
.
SkipNow
()
}
if
os
.
Getenv
(
"TRAVIS"
)
==
"true"
{
if
travis
.
IsRunning
()
{
t
.
Skip
(
"this doesn't work well on travis"
)
}
...
...
p2p/net/conn/secure_conn_test.go
浏览文件 @
0311c051
...
...
@@ -2,13 +2,13 @@ package conn
import
(
"bytes"
"os"
"runtime"
"sync"
"testing"
"time"
ic
"github.com/jbenet/go-ipfs/p2p/crypto"
travis
"github.com/jbenet/go-ipfs/util/testutil/ci/travis"
context
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
)
...
...
@@ -131,7 +131,7 @@ func TestSecureCloseLeak(t *testing.T) {
if
testing
.
Short
()
{
t
.
SkipNow
()
}
if
os
.
Getenv
(
"TRAVIS"
)
==
"true"
{
if
travis
.
IsRunning
()
{
t
.
Skip
(
"this doesn't work well on travis"
)
}
...
...
p2p/net/swarm/dial_test.go
浏览文件 @
0311c051
...
...
@@ -2,14 +2,16 @@ package swarm
import
(
"net"
"os"
"sync"
"testing"
"time"
addrutil
"github.com/jbenet/go-ipfs/p2p/net/swarm/addr"
peer
"github.com/jbenet/go-ipfs/p2p/peer"
testutil
"github.com/jbenet/go-ipfs/util/testutil"
jenkins
"github.com/jbenet/go-ipfs/util/testutil/ci/jenkins"
travis
"github.com/jbenet/go-ipfs/util/testutil/ci/travis"
context
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
ma
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
...
...
@@ -114,7 +116,7 @@ func TestDialWait(t *testing.T) {
defer
s1
.
Close
()
s1
.
dialT
=
time
.
Millisecond
*
300
// lower timeout for tests.
if
os
.
Getenv
(
"TRAVIS"
)
==
"true"
{
if
travis
.
IsRunning
()
{
s1
.
dialT
=
time
.
Second
}
...
...
@@ -148,8 +150,8 @@ func TestDialWait(t *testing.T) {
func
TestDialBackoff
(
t
*
testing
.
T
)
{
// t.Skip("skipping for another test")
if
os
.
Getenv
(
"TRAVIS"
)
==
"true"
{
t
.
Skip
(
"travis will never have fun with this test"
)
if
travis
.
IsRunning
()
||
jenkins
.
IsRunning
()
{
t
.
Skip
(
"travis
and jenkins
will never have fun with this test"
)
}
t
.
Parallel
()
...
...
@@ -375,7 +377,7 @@ func TestDialBackoffClears(t *testing.T) {
defer
s2
.
Close
()
s1
.
dialT
=
time
.
Millisecond
*
300
// lower timeout for tests.
s2
.
dialT
=
time
.
Millisecond
*
300
// lower timeout for tests.
if
os
.
Getenv
(
"TRAVIS"
)
==
"true"
{
if
travis
.
IsRunning
()
{
s1
.
dialT
=
time
.
Second
s2
.
dialT
=
time
.
Second
}
...
...
util/ctx/fracctx_test.go
浏览文件 @
0311c051
package
ctxutil
import
(
"os"
"testing"
"time"
travis
"github.com/jbenet/go-ipfs/util/testutil/ci/travis"
context
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
)
// this test is on the context tool itself, not our stuff. it's for sanity on ours.
func
TestDeadline
(
t
*
testing
.
T
)
{
if
os
.
Getenv
(
"TRAVIS"
)
==
"true"
{
if
travis
.
IsRunning
()
{
t
.
Skip
(
"timeouts don't work reliably on travis"
)
}
...
...
@@ -42,7 +43,7 @@ func TestDeadlineFractionForever(t *testing.T) {
}
func
TestDeadlineFractionHalf
(
t
*
testing
.
T
)
{
if
os
.
Getenv
(
"TRAVIS"
)
==
"true"
{
if
travis
.
IsRunning
()
{
t
.
Skip
(
"timeouts don't work reliably on travis"
)
}
...
...
util/testutil/ci/ci.go
浏览文件 @
0311c051
...
...
@@ -42,11 +42,11 @@ func Env(v EnvVar) string {
}
// Returns whether FUSE is explicitly disabled wiht TEST_NO_FUSE.
func
NoFuse
(
v
EnvVar
)
bool
{
func
NoFuse
()
bool
{
return
os
.
Getenv
(
string
(
VarNoFuse
))
==
"1"
}
// Returns whether TEST_VERBOSE is enabled.
func
Verbose
(
v
EnvVar
)
bool
{
func
Verbose
()
bool
{
return
os
.
Getenv
(
string
(
VarVerbose
))
==
"1"
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论