Short benchmark test only by default

This commit is contained in:
Jakob Borg 2014-09-28 07:55:12 +02:00
parent 5f93fbd471
commit 6f750582dd
2 changed files with 7 additions and 2 deletions

View File

@ -2,7 +2,7 @@
set -euo pipefail
IFS=$'\n\t'
go test -tags integration -v
go test -tags integration -v -short
./test-http.sh
./test-merge.sh
./test-delupd.sh

View File

@ -14,6 +14,11 @@ import (
)
func TestBenchmarkTransfer(t *testing.T) {
nfiles := 10000
if testing.Short() {
nfiles = 1000
}
log.Println("Cleaning...")
err := removeAll("s1", "s2", "h1/index", "h2/index")
if err != nil {
@ -21,7 +26,7 @@ func TestBenchmarkTransfer(t *testing.T) {
}
log.Println("Generating files...")
err = generateFiles("s1", 10000, 22, "../bin/syncthing")
err = generateFiles("s1", nfiles, 22, "../bin/syncthing")
if err != nil {
t.Fatal(err)
}