From 9add44f117dca34a14e10e37dd5bb7c87b3dee13 Mon Sep 17 00:00:00 2001 From: Toni Melisma <59022391+tonimelisma@users.noreply.github.com> Date: Mon, 7 Nov 2022 21:12:55 -0800 Subject: [PATCH] Add architecture --- vips/image_golden_test.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/vips/image_golden_test.go b/vips/image_golden_test.go index 159cd105..200cfd4a 100644 --- a/vips/image_golden_test.go +++ b/vips/image_golden_test.go @@ -1037,24 +1037,25 @@ func goldenCreateTest( func getEnvironment() string { switch runtime.GOOS { case "windows": - return "windows" + "_libvips-" + Version + // Missing Windows version detection. Windows is not a supported CI target right now + return "windows_" + runtime.GOARCH + "_libvips-" + Version case "darwin": out, err := exec.Command("sw_vers", "-productVersion").Output() if err != nil { - return "macos-unknown" + return "macos-unknown_" + runtime.GOARCH + "_libvips-" + Version } majorVersion := strings.Split(strings.TrimSpace(string(out)), ".")[0] - return "macos-" + majorVersion + "_libvips-" + Version + return "macos-" + majorVersion + "_" + runtime.GOARCH + "_libvips-" + Version case "linux": out, err := exec.Command("lsb_release", "-cs").Output() if err != nil { - return "linux" + return "linux-unknown_" + runtime.GOARCH } strout := strings.TrimSuffix(string(out), "\n") - return "linux-" + strout + "_libvips-" + Version + return "linux-" + strout + "_" + runtime.GOARCH + "_libvips-" + Version } // default to unknown assets otherwise - return "unknown_libvips-" + Version + return "unknown_" + runtime.GOARCH + "_libvips-" + Version } func assertGoldenMatch(t *testing.T, file string, buf []byte, format ImageType) {