Skip to content

Commit

Permalink
graph/flow: skip rather than erroring when there is no benchmark data
Browse files Browse the repository at this point in the history
  • Loading branch information
kortschak committed Oct 8, 2020
1 parent bd0b526 commit 36293e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions graph/flow/control_flow_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"fmt"
"io/ioutil"
"math"
"os"
"path/filepath"
"strings"
"testing"
Expand All @@ -31,6 +32,9 @@ func BenchmarkDominators(b *testing.B) {

fis, err := ioutil.ReadDir(testdata)
if err != nil {
if os.IsNotExist(err) {
b.Skipf("no control flow testdata: %v", err)
}
b.Fatalf("failed to open control flow testdata: %v", err)
}
for _, fi := range fis {
Expand Down

0 comments on commit 36293e6

Please sign in to comment.