Don't ignore permissions in benchmark tests
This commit is contained in:
+2
-6
@@ -76,13 +76,11 @@ func BenchmarkExtract(b *testing.B) {
|
|||||||
}
|
}
|
||||||
libPath := filepath.Join(tmpDir, "ExtractLib")
|
libPath := filepath.Join(tmpDir, "ExtractLib")
|
||||||
os.RemoveAll(libPath)
|
os.RemoveAll(libPath)
|
||||||
op := FastOptions()
|
|
||||||
op.IgnorePerm = true
|
|
||||||
rdr, err := NewReader(fil)
|
rdr, err := NewReader(fil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
b.Fatal(err)
|
b.Fatal(err)
|
||||||
}
|
}
|
||||||
err = rdr.ExtractWithOptions(libPath, op)
|
err = rdr.ExtractWithOptions(libPath, FastOptions())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
b.Fatal(err)
|
b.Fatal(err)
|
||||||
}
|
}
|
||||||
@@ -99,14 +97,12 @@ func BenchmarkRace(b *testing.B) {
|
|||||||
os.RemoveAll(libPath)
|
os.RemoveAll(libPath)
|
||||||
os.RemoveAll(unsquashPath)
|
os.RemoveAll(unsquashPath)
|
||||||
var libTime, unsquashTime time.Duration
|
var libTime, unsquashTime time.Duration
|
||||||
op := FastOptions()
|
|
||||||
op.IgnorePerm = true
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
rdr, err := NewReader(fil)
|
rdr, err := NewReader(fil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
b.Fatal(err)
|
b.Fatal(err)
|
||||||
}
|
}
|
||||||
err = rdr.ExtractWithOptions(libPath, op)
|
err = rdr.ExtractWithOptions(libPath, FastOptions())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
b.Fatal(err)
|
b.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user