summaryrefslogtreecommitdiff
path: root/xdelta3/go
diff options
context:
space:
mode:
authorJosh MacDonald <josh.macdonald@gmail.com>2015-12-27 22:12:34 -0800
committerJosh MacDonald <josh.macdonald@gmail.com>2015-12-27 22:12:34 -0800
commitec9905aa755eafb64f08fc59ca7e67ea57498264 (patch)
tree304cae17d7d856c3ef465f7fad18398347272970 /xdelta3/go
parentdbbc4c4a59bb805a828bd61640ec8ba88fe92871 (diff)
parentcf662894ba5b3847f06fd44dfb91f4733d9196f4 (diff)
Merge frmo origin
Diffstat (limited to 'xdelta3/go')
-rw-r--r--xdelta3/go/src/regtest.go8
-rw-r--r--xdelta3/go/src/xdelta/run.go3
-rw-r--r--xdelta3/go/src/xdelta/tgroup.go4
3 files changed, 8 insertions, 7 deletions
diff --git a/xdelta3/go/src/regtest.go b/xdelta3/go/src/regtest.go
index bcf0de9..a7cab33 100644
--- a/xdelta3/go/src/regtest.go
+++ b/xdelta3/go/src/regtest.go
@@ -13,8 +13,8 @@ import (
13 13
14const ( 14const (
15 xdataset = "/volume/home/jmacd/src/testdata" 15 xdataset = "/volume/home/jmacd/src/testdata"
16 xcompare = "/volume/home/jmacd/src/xdelta3-devel/xdelta3/xdelta3" 16 xcompare = "/volume/home/jmacd/src/xdelta-devel/xdelta3/xdelta3"
17 xdelta3 = "/volume/home/jmacd/src/xdelta-64bithash/xdelta3/xdelta3" 17 xdelta3 = "/volume/home/jmacd/src/xdelta-64bithash/xdelta3/xdelta3"
18 seed = 1422253499919909358 18 seed = 1422253499919909358
19) 19)
20 20
@@ -35,12 +35,10 @@ func (c Config) smokeTest(t *xdelta.TestGroup, p xdelta.Program) {
35 35
36 enc, err := t.Exec("encode", p, true, []string{"-e"}) 36 enc, err := t.Exec("encode", p, true, []string{"-e"})
37 if err != nil { 37 if err != nil {
38 fmt.Println(err)
39 t.Panic(err) 38 t.Panic(err)
40 } 39 }
41 dec, err := t.Exec("decode", p, true, []string{"-d"}) 40 dec, err := t.Exec("decode", p, true, []string{"-d"})
42 if err != nil { 41 if err != nil {
43 fmt.Println(err)
44 t.Panic(err) 42 t.Panic(err)
45 } 43 }
46 44
@@ -234,7 +232,7 @@ func (cfg Config) offsetTest(t *xdelta.TestGroup, p xdelta.Program, offset, leng
234 232
235 // The decoder output ("read", above) is compared with the 233 // The decoder output ("read", above) is compared with the
236 // test-provided output ("write", below). The following 234 // test-provided output ("write", below). The following
237 // generates the input and output twice. 235 // generates two identical inputs.
238 t.WriteRstreams("encode", seed, offset, length, enc.Srcin, enc.Stdin) 236 t.WriteRstreams("encode", seed, offset, length, enc.Srcin, enc.Stdin)
239 t.WriteRstreams("decode", seed, offset, length, dec.Srcin, write) 237 t.WriteRstreams("decode", seed, offset, length, dec.Srcin, write)
240 t.Wait(enc, dec) 238 t.Wait(enc, dec)
diff --git a/xdelta3/go/src/xdelta/run.go b/xdelta3/go/src/xdelta/run.go
index 6523a1c..448fabe 100644
--- a/xdelta3/go/src/xdelta/run.go
+++ b/xdelta3/go/src/xdelta/run.go
@@ -55,7 +55,8 @@ func (r *Runner) RunTest(name string, f func (t *TestGroup)) {
55 c := make(chan interface{}) 55 c := make(chan interface{})
56 go func() { 56 go func() {
57 defer func() { 57 defer func() {
58 c <- recover() 58 rec := recover()
59 c <- rec
59 }() 60 }()
60 fmt.Println("Testing", name, "...") 61 fmt.Println("Testing", name, "...")
61 f(t) 62 f(t)
diff --git a/xdelta3/go/src/xdelta/tgroup.go b/xdelta3/go/src/xdelta/tgroup.go
index b1b04ec..602b1e1 100644
--- a/xdelta3/go/src/xdelta/tgroup.go
+++ b/xdelta3/go/src/xdelta/tgroup.go
@@ -58,7 +58,9 @@ func (g *Goroutine) OK() {
58 58
59func (g *Goroutine) Panic(err error) { 59func (g *Goroutine) Panic(err error) {
60 g.finish(err) 60 g.finish(err)
61 runtime.Goexit() 61 if g != g.TestGroup.main {
62 runtime.Goexit()
63 }
62} 64}
63 65
64func (t *TestGroup) Main() *Goroutine { return t.main } 66func (t *TestGroup) Main() *Goroutine { return t.main }