diff --git a/.github/workflows/run_test_cases.yaml b/.github/workflows/run_test_cases.yaml index 8f3a84c36..4ee8efa2e 100644 --- a/.github/workflows/run_test_cases.yaml +++ b/.github/workflows/run_test_cases.yaml @@ -112,6 +112,7 @@ jobs: - name: eunit env: PROFILE: ${{ matrix.profile }} + CT_COVER_EXPORT_PREFIX: ${{ matrix.profile }}-${{ matrix.otp }} working-directory: source run: make eunit @@ -119,6 +120,7 @@ jobs: - name: proper env: PROFILE: ${{ matrix.profile }} + CT_COVER_EXPORT_PREFIX: ${{ matrix.profile }}-${{ matrix.otp }} working-directory: source run: make proper @@ -159,6 +161,7 @@ jobs: REDIS_TAG: 6 INFLUXDB_TAG: 2.5.0 PROFILE: ${{ matrix.profile }} + CT_COVER_EXPORT_PREFIX: ${{ matrix.profile }}-${{ matrix.otp }} run: ./scripts/ct/run.sh --app ${{ matrix.app }} - uses: actions/upload-artifact@v3 with: @@ -199,6 +202,7 @@ jobs: working-directory: source env: PROFILE: ${{ matrix.profile }} + CT_COVER_EXPORT_PREFIX: ${{ matrix.profile }}-${{ matrix.otp }} run: | make "${{ matrix.app }}-ct" - uses: actions/upload-artifact@v3 diff --git a/Makefile b/Makefile index cb26a2529..9a02fcd08 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,7 @@ PROFILES := $(REL_PROFILES) $(PKG_PROFILES) default CT_NODE_NAME ?= 'test@127.0.0.1' CT_READABLE ?= true +CT_COVER_EXPORT_PREFIX ?= $(PROFILE) export REBAR_GIT_CLONE_OPTIONS += --depth=1 @@ -62,7 +63,7 @@ mix-deps-get: $(ELIXIR_COMMON_DEPS) .PHONY: eunit eunit: $(REBAR) merge-config - @ENABLE_COVER_COMPILE=1 $(REBAR) eunit -v -c --cover_export_name $(PROFILE)-eunit + @ENABLE_COVER_COMPILE=1 $(REBAR) eunit -v -c --cover_export_name $(CT_COVER_EXPORT_PREFIX)-eunit .PHONY: proper proper: $(REBAR) @@ -74,7 +75,7 @@ test-compile: $(REBAR) merge-config .PHONY: ct ct: $(REBAR) merge-config - @ENABLE_COVER_COMPILE=1 $(REBAR) ct --name $(CT_NODE_NAME) -c -v --cover_export_name $(PROFILE)-ct + @ENABLE_COVER_COMPILE=1 $(REBAR) ct --name $(CT_NODE_NAME) -c -v --cover_export_name $(CT_COVER_EXPORT_PREFIX)-ct .PHONY: static_checks static_checks: @@ -86,7 +87,10 @@ APPS=$(shell $(SCRIPTS)/find-apps.sh) define gen-app-ct-target $1-ct: $(REBAR) @$(SCRIPTS)/pre-compile.sh $(PROFILE) - @ENABLE_COVER_COMPILE=1 $(REBAR) ct --name $(CT_NODE_NAME) -c -v --cover_export_name $(PROFILE)-$(subst /,-,$1) --suite $(shell $(SCRIPTS)/find-suites.sh $1) + @ENABLE_COVER_COMPILE=1 $(REBAR) ct -c -v \ + --name $(CT_NODE_NAME) \ + --cover_export_name $(CT_COVER_EXPORT_PREFIX)-$(subst /,-,$1) \ + --suite $(shell $(SCRIPTS)/find-suites.sh $1) endef $(foreach app,$(APPS),$(eval $(call gen-app-ct-target,$(app))))