Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
88898: geomfn: skip some testcases when running `TestVoronoiPolygons` on ARM64 r=otan a=healthy-pod

This code change skips a testcase in `TestVoronoiPolygons` when running on ARM64 (Graviton2 / M1).

Release note: None

Co-authored-by: healthy-pod <[email protected]>
  • Loading branch information
craig[bot] and healthy-pod committed Sep 28, 2022
2 parents 6d5dae1 + 6449ce3 commit 455369c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/geo/geomfn/voronoi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
package geomfn

import (
"runtime"
"testing"

"github.com/cockroachdb/cockroach/pkg/geo"
Expand All @@ -31,6 +32,7 @@ func TestVoronoiPolygons(t *testing.T) {
args args
expected geo.Geometry
expectedErr error
skipOnArm64 bool
}{
{
name: "Computes Voronoi Polygons for a given MultiPoint",
Expand Down Expand Up @@ -75,7 +77,8 @@ func TestVoronoiPolygons(t *testing.T) {
tol: 0,
onlyEdges: true,
},
expected: geo.MustParseGeometry("MULTILINESTRING ((310.3571428571428 500, 353.515625 298.59375), (353.515625 298.59375, 306.875 231.9642857142857), (306.875 231.9642857142857, 110 175.7142857142857), (589.1666666666666 -10, 306.875 231.9642857142857), (353.515625 298.59375, 590 204))"),
expected: geo.MustParseGeometry("MULTILINESTRING ((310.3571428571428 500, 353.515625 298.59375), (353.515625 298.59375, 306.875 231.9642857142857), (306.875 231.9642857142857, 110 175.7142857142857), (589.1666666666666 -10, 306.875 231.9642857142857), (353.515625 298.59375, 590 204))"),
skipOnArm64: true,
},
{
name: "Computes Voronoi Diagram for a given MultiPoint with an empty envelope",
Expand All @@ -89,6 +92,9 @@ func TestVoronoiPolygons(t *testing.T) {
},
}
for _, tc := range tests {
if runtime.GOARCH == "arm64" && tc.skipOnArm64 {
continue
}
t.Run(tc.name, func(t *testing.T) {
actual, err := VoronoiDiagram(tc.args.a, tc.args.env, tc.args.tol, tc.args.onlyEdges)
if tc.expectedErr != nil && tc.expectedErr.Error() != err.Error() {
Expand Down

0 comments on commit 455369c

Please sign in to comment.