Skip to content

Commit

Permalink
Merge pull request #1000 from nestoracunablanco/fix/unittests-multiarch
Browse files Browse the repository at this point in the history
fix: enable make unittest for different architectures.
  • Loading branch information
kubevirt-bot committed Jun 27, 2024
2 parents bb639a0 + a55e2cb commit 0592ead
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ ifndef ignore-not-found
ignore-not-found = false
endif

# Get the current architecture
ARCH := $(shell uname -m)
ifeq ($(ARCH), x86_64)
ARCH := amd64
endif

# Get the current OS
OS := $(shell uname | tr '[:upper:]' '[:lower:]')

all: manager

.PHONY: unittest
Expand Down Expand Up @@ -340,8 +349,8 @@ PROMTOOL_VERSION ?= 2.44.0
.PHONY: promtool
promtool: $(PROMTOOL)
$(PROMTOOL): $(LOCALBIN)
test -s $(PROMTOOL) || curl -sSfL "https://github.com/prometheus/prometheus/releases/download/v$(PROMTOOL_VERSION)/prometheus-$(PROMTOOL_VERSION).linux-amd64.tar.gz" | \
tar xvzf - --directory=$(LOCALBIN) "prometheus-$(PROMTOOL_VERSION).linux-amd64"/promtool --strip-components=1
test -s $(PROMTOOL) || curl -sSfL "https://github.com/prometheus/prometheus/releases/download/v$(PROMTOOL_VERSION)/prometheus-$(PROMTOOL_VERSION).${OS}-$(ARCH).tar.gz" | \
tar xvzf - --directory=$(LOCALBIN) "prometheus-$(PROMTOOL_VERSION).${OS}-$(ARCH)"/promtool --strip-components=1

METRIC_RULES_WRITER ?= $(LOCALBIN)/metrics-rules-writer

Expand Down

0 comments on commit 0592ead

Please sign in to comment.