From ed2ed65740553a8147da5b7b482bef9f93893e54 Mon Sep 17 00:00:00 2001 From: muzarski Date: Wed, 18 Sep 2024 17:53:43 +0200 Subject: [PATCH] makefile: fix rebuild IT binary condition Currently, we rebuild (even if it exists) IT binary if DONT_REBUILD_INTEGRATION_BIN env var is non-empty. I believe it should be the opposite. I changed it to something more clear, making use of `ifdef`. Now, we: - rebuild binary if `DONT_REBUILD_INTEGRATION_BIN` is not defined - don't rebuild binary (if it exists) otherwise --- Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8847ff52..19438a96 100644 --- a/Makefile +++ b/Makefile @@ -60,10 +60,6 @@ ifndef CASSANDRA_VERSION CASSANDRA_VERSION := 3.11.17 endif -ifndef DONT_REBUILD_INTEGRATION_BIN - DONT_REBUILD_INTEGRATION_BIN := ${EMPTY} -endif - CURRENT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) BUILD_DIR := "${CURRENT_DIR}build" INTEGRATION_TEST_BIN := ${BUILD_DIR}/cassandra-integration-tests @@ -171,7 +167,7 @@ download-ccm-cassandra-image: install-ccm-if-missing @rm -rf /tmp/download-cassandra.ccm run-test-integration-scylla: prepare-integration-test download-ccm-scylla-image -ifeq ($(DONT_REBUILD_INTEGRATION_BIN), $(EMPTY)) +ifdef DONT_REBUILD_INTEGRATION_BIN run-test-integration-scylla: build-integration-test-bin-if-missing else run-test-integration-scylla: build-integration-test-bin @@ -180,7 +176,7 @@ endif valgrind --error-exitcode=123 --leak-check=full --errors-for-leak-kinds=definite build/cassandra-integration-tests --scylla --version=${SCYLLA_VERSION} --category=CASSANDRA --verbose=ccm --gtest_filter="${SCYLLA_TEST_FILTER}" run-test-integration-cassandra: prepare-integration-test download-ccm-cassandra-image install-java8-if-missing -ifeq ($(DONT_REBUILD_INTEGRATION_BIN), $(EMPTY)) +ifdef DONT_REBUILD_INTEGRATION_BIN run-test-integration-cassandra: build-integration-test-bin-if-missing else run-test-integration-cassandra: build-integration-test-bin