Skip to content

Commit

Permalink
license needs to be removed only for CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
asorbini committed Apr 16, 2024
1 parent e31c22e commit f8837a2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,19 @@ BASE_UNIT_TEST_COMMAND := \
pytest -s -v \
--junit-xml=$(TEST_RESULTS_DIR)/$(TEST_JUNIT_REPORT)__unit.xml \
test/unit
# When run by a CI test, the test image is expected to contain an
# embedded RTI license at /rti_license.dat. To test without it, we
# must change the test command to delete the license
ifneq ($(TEST_RELEASE),)
# When run by a (non-release) CI test, the test image is expected
# to contain an embedded RTI license at /rti_license.dat.
# To test without it, we must change the test command to delete
# the license.
ifeq ($(TEST_RELEASE),)
ifneq ($(NO_LICENSE),)
UNIT_TEST_COMMAND := \
sh -exc '\
rm /rti_license.dat; \
rm -f /rti_license.dat; \
unset RTI_LICENSE_FILE; \
$(BASE_UNIT_TEST_COMMAND) $(UNIT_TEST_ARGS)'
endif # ifneq ($(NO_LICENSE),)
endif # ifneq ($(TEST_RELEASE),)
endif # ifeq ($(TEST_RELEASE),)
ifeq ($(UNIT_TEST_COMMAND),)
UNIT_TEST_COMMAND := $(BASE_UNIT_TEST_COMMAND) $(UNIT_TEST_ARGS)
endif # ifeq ($(UNIT_TEST_COMMAND),)
Expand Down

0 comments on commit f8837a2

Please sign in to comment.