Merge pull request #938 from sm00th/unitenv

test/unit: add support for .env files
This commit is contained in:
Joe Lawrence 2019-02-08 10:45:21 -05:00 committed by GitHub
commit 5a0c0ad944
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@ EXT_OUTPUT ?= OUTPUT.o
EXT_TEST_OUTPUT ?= test.out EXT_TEST_OUTPUT ?= test.out
EXT_SYMTAB ?= symtab EXT_SYMTAB ?= symtab
EXT_SYMVERS ?= symvers EXT_SYMVERS ?= symvers
EXT_ENV ?= env
TNAME = $(@:.$(EXT_OUTPUT)=) TNAME = $(@:.$(EXT_OUTPUT)=)
ifndef VERBOSE ifndef VERBOSE
@ -54,7 +55,7 @@ clean:
@echo "BUILD $(TNAME)" @echo "BUILD $(TNAME)"
$(call check_all,$(TNAME).$(EXT_ORIG)) $(call check_all,$(TNAME).$(EXT_ORIG))
$(call check_all,$(TNAME).$(EXT_PATCHED)) $(call check_all,$(TNAME).$(EXT_PATCHED))
$(CDO_ENV) $(CDO) $(TNAME).$(EXT_ORIG) $(TNAME).$(EXT_PATCHED) \ $(CDO_ENV) $(file < $(TNAME).$(EXT_ENV)) $(CDO) $(TNAME).$(EXT_ORIG) $(TNAME).$(EXT_PATCHED) \
vmlinux $(TNAME).$(EXT_SYMTAB) $(SYMVERS_FILE) \ vmlinux $(TNAME).$(EXT_SYMTAB) $(SYMVERS_FILE) \
test_$(TNAME) $@ $(MUTE_PASS) test_$(TNAME) $@ $(MUTE_PASS)
@ -62,7 +63,7 @@ clean:
@echo "BUILD $(TNAME)-FAIL" @echo "BUILD $(TNAME)-FAIL"
$(call check_all,$(TNAME).$(EXT_ORIG)) $(call check_all,$(TNAME).$(EXT_ORIG))
$(call check_all,$(TNAME).$(EXT_FAIL)) $(call check_all,$(TNAME).$(EXT_FAIL))
! $(CDO_ENV) $(CDO) $(TNAME).$(EXT_ORIG) $(TNAME).$(EXT_FAIL) \ ! $(CDO_ENV) $(file < $(TNAME).$(EXT_ENV)) $(CDO) $(TNAME).$(EXT_ORIG) $(TNAME).$(EXT_FAIL) \
vmlinux $(TNAME).$(EXT_SYMTAB) $(SYMVERS_FILE) \ vmlinux $(TNAME).$(EXT_SYMTAB) $(SYMVERS_FILE) \
test_$(TNAME) $@ $(MUTE_FAIL) test_$(TNAME) $@ $(MUTE_FAIL)
# Expecting to fail, thus create output file manually so we won't rerun the # Expecting to fail, thus create output file manually so we won't rerun the