Skip to content

Commit 50b051b

Browse files
binarinmergify-bot
authored andcommitted
Make test/development related makefile vars lazy
They were trying to run `hostname` and `which`, which produced a bunch of error messages in a hermetic build environment. And performance of those `shell` calls is not very important, as they are caled just a few times during script runtime anyway (there is a hack to make these lazy, but evaluating only once - but it's hardly worth it). (cherry picked from commit 87532c4)
1 parent dc3777f commit 50b051b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

deps/rabbit_common/mk/rabbitmq-run.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ node_enabled_plugins_file = $(call node_tmpdir,$(1))/enabled_plugins
6767

6868
# Broker startup variables for the test environment.
6969
ifeq ($(PLATFORM),msys2)
70-
HOSTNAME := $(COMPUTERNAME)
70+
HOSTNAME = $(COMPUTERNAME)
7171
else
7272
ifeq ($(PLATFORM),solaris)
73-
HOSTNAME := $(shell hostname | sed 's@\..*@@')
73+
HOSTNAME = $(shell hostname | sed 's@\..*@@')
7474
else
75-
HOSTNAME := $(shell hostname -s)
75+
HOSTNAME = $(shell hostname -s)
7676
endif
7777
endif
7878

@@ -265,8 +265,8 @@ endif
265265
endif
266266

267267
run-broker run-tls-broker: RABBITMQ_CONFIG_FILE := $(basename $(TEST_CONFIG_FILE))
268-
run-broker: config := $(test_rabbitmq_config)
269-
run-tls-broker: config := $(test_rabbitmq_config_with_tls)
268+
run-broker: config = $(test_rabbitmq_config)
269+
run-tls-broker: config = $(test_rabbitmq_config_with_tls)
270270
run-tls-broker: $(TEST_TLS_CERTS_DIR)
271271

272272
run-broker run-tls-broker: node-tmpdir $(DIST_TARGET) $(TEST_CONFIG_FILE)

deps/rabbit_common/mk/rabbitmq-tools.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
ifeq ($(PLATFORM),msys2)
2-
HOSTNAME := $(COMPUTERNAME)
2+
HOSTNAME = $(COMPUTERNAME)
33
else
44
ifeq ($(PLATFORM),solaris)
5-
HOSTNAME := $(shell hostname | sed 's@\..*@@')
5+
HOSTNAME = $(shell hostname | sed 's@\..*@@')
66
else
7-
HOSTNAME := $(shell hostname -s)
7+
HOSTNAME = $(shell hostname -s)
88
endif
99
endif
1010

mk/bazel.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ build --flaky_test_attempts=1
2828
build:buildbuddy --remote_header=x-buildbuddy-api-key=YOUR_API_KEY
2929
endef
3030

31-
export USER_BAZELRC
31+
user.bazelrc: export USER_BAZELRC
3232
user.bazelrc:
3333
echo "$$USER_BAZELRC" > $@
3434

0 commit comments

Comments
 (0)