Fixed grep not failing on error.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 4s

This commit is contained in:
Willem Cazander 2024-07-17 23:30:22 +02:00
parent 360e12c9e9
commit 30c32fe41d
5 changed files with 12 additions and 12 deletions

View file

@ -5,7 +5,7 @@ define __mb-flow-assert-grep-binary-x
$(1)/@$(5)-deps:: $(1)/@assert/$(5)/$(2)
$(1)/@assert/$(5)/$(2): $(1)/@build
$(MB_@RECIPE)grep -q -U $(4) $(1)/$(3)
$(MB_@RECIPE)grep --colour$(MB_MAKE_EQUALS)auto -U "$(4)" $(1)/$(3)
$(MB_@RECIPE)$$(call mb-make-call,mb-os-echo-assert,$$(MB_I18N_ASSERT_SUCCESS) $(1)/@assert/$(2)/$(5))
$(MB_@RECIPE)$$(call mb-make-call,mb-proj-grow-assert-success,$(5))
$(MB_   )$$(call mb-make-call,mb-doc-target-assert,$(1)/@assert/$(5)/$(2),Asserts that $(3) output matches.)
@ -35,7 +35,7 @@ $(7)/@@init-deps:: $(1)/@build
$(1)/@assert/$(5)/$(2): $(7)/@build
$(MB_@RECIPE)$$(if $$(wildcard $(7)/$(3).out),,$$(call mb-make-call,mb-os-file-delete,$(7)/$(3).out))
$(MB_@RECIPE)$$(call mb-make-call,mb-msxpipe-safe-assert,$(7),$(3) > $(3).out,$(6))
$(MB_@RECIPE)grep -q $(4) $(7)/$(3).out
$(MB_@RECIPE)grep --colour$(MB_MAKE_EQUALS)auto "$(4)" $(7)/$(3).out
$(MB_@RECIPE)$$(call mb-make-call,mb-os-echo-assert,$$(MB_I18N_ASSERT_SUCCESS) $(1)/@assert/$(2)/$(5))
$(MB_@RECIPE)$$(call mb-make-call,mb-proj-grow-assert-success,$(5))
$(MB_   )$$(call mb-make-call,mb-doc-target-assert,$(1)/@assert/$(5)/$(2),Asserts that $(3) output matches.)

View file

@ -16,10 +16,10 @@ _$(MB_  )$(call mb-make-call,mb-autoexec-append-safe-assert,$(EXAMP
_$(MB_  )$(call mb-make-call,mb-autoexec-append-safe-assert,$(EXAMPLE_DIST_HELLO_QA_DOS2_BIN),hello4 > hello4.out)
_$(MB_  )$(call mb-make-call,mb-autoexec-append-exit,$(EXAMPLE_DIST_HELLO_QA_DOS2_BIN))
_$(MB_  )$(call mb-make-call,mb-openmsx-dosctl,$(EXAMPLE_DIST_HELLO_QA_DOS2_BIN))
_$(MB_  )grep -q "M80: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_DOS2_BIN)/hello1.out
_$(MB_  )grep -q "SDCC: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_DOS2_BIN)/hello2.out
_$(MB_  )grep -q "MAKE: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_DOS2_BIN)/hello3.out
_$(MB_  )grep -q "N80: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_DOS2_BIN)/hello4.out
_$(MB_  )grep --colour$(MB_MAKE_EQUALS)auto "M80: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_DOS2_BIN)/hello1.out
_$(MB_  )grep --colour$(MB_MAKE_EQUALS)auto "SDCC: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_DOS2_BIN)/hello2.out
_$(MB_  )grep --colour$(MB_MAKE_EQUALS)auto "MAKE: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_DOS2_BIN)/hello3.out
_$(MB_  )grep --colour$(MB_MAKE_EQUALS)auto "N80: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_DOS2_BIN)/hello4.out
_$(MB_  )$(call mb-make-call,mb-os-echo-assert,$(MB_I18N_ASSERT_SUCCESS) $(EXAMPLE_DIST_HELLO_QA_DOS2_BIN)/@assert)
_$(MB_  )$(call mb-make-call,mb-proj-grow-assert-success,@package-qa)
_$(MB_  )$(call mb-make-call,mb-proj-grow-assert-success,@package-qa)

View file

@ -19,10 +19,10 @@ _$(MB_  )$(call mb-make-call,mb-autoexec-append-safe-assert,$(EXAMP
_$(MB_  )$(call mb-make-call,mb-autoexec-append-safe-assert,$(EXAMPLE_DIST_HELLO_QA_MSX1_BIN),hello4 > hello4.out)
_$(MB_  )$(call mb-make-call,mb-autoexec-append-exit,$(EXAMPLE_DIST_HELLO_QA_MSX1_BIN))
_$(MB_  )$(call mb-make-call,mb-openmsx-dosctl,$(EXAMPLE_DIST_HELLO_QA_MSX1_BIN),$(EXAMPLE_DIST_HELLO_QA_MSX1_MACHINE))
_$(MB_  )grep -q "M80: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_MSX1_BIN)/hello1.out
_$(MB_  )grep -q "SDCC: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_MSX1_BIN)/hello2.out
_$(MB_  )grep -q "MAKE: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_MSX1_BIN)/hello3.out
_$(MB_  )grep -q "N80: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_MSX1_BIN)/hello4.out
_$(MB_  )grep --colour$(MB_MAKE_EQUALS)auto "M80: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_MSX1_BIN)/hello1.out
_$(MB_  )grep --colour$(MB_MAKE_EQUALS)auto "SDCC: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_MSX1_BIN)/hello2.out
_$(MB_  )grep --colour$(MB_MAKE_EQUALS)auto "MAKE: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_MSX1_BIN)/hello3.out
_$(MB_  )grep --colour$(MB_MAKE_EQUALS)auto "N80: Hello MSX" $(EXAMPLE_DIST_HELLO_QA_MSX1_BIN)/hello4.out
_$(MB_  )$(call mb-make-call,mb-os-echo-assert,$(MB_I18N_ASSERT_SUCCESS) $(EXAMPLE_DIST_HELLO_QA_MSX1_BIN)/@assert)
_$(MB_  )$(call mb-make-call,mb-proj-grow-assert-success,@package-qa)
_$(MB_  )$(call mb-make-call,mb-proj-grow-assert-success,@package-qa)

View file

@ -5,5 +5,5 @@ EXAMPLE_HELLO_MACRO80_DEPS := $(EXAMPLE_HELLO_MACRO80_BIN)/hello.com
$(call mb-make-call,mb-flow-macro80-bdos-mono,$(EXAMPLE_HELLO_MACRO80_BIN),$(EXAMPLE_HELLO_MACRO80_SRC),hello)
$(call mb-make-call,mb-flow-assert-msxpipe-grep-test,$(EXAMPLE_HELLO_MACRO80_BIN),$(EXAMPLE_HELLO_MACRO80_DEPS),check-m80,hello,M80)
$(call mb-make-call,mb-flow-assert-msxpipe-grep-test,$(EXAMPLE_HELLO_MACRO80_BIN),$(EXAMPLE_HELLO_MACRO80_DEPS),check-txt,hello,"o MSX world...")
$(call mb-make-call,mb-flow-assert-msxpipe-grep-test,$(EXAMPLE_HELLO_MACRO80_BIN),$(EXAMPLE_HELLO_MACRO80_DEPS),check-txt,hello,o MSX world...)

View file

@ -5,5 +5,5 @@ EXAMPLE_HELLO_NESTOR80_DEPS := $(EXAMPLE_HELLO_NESTOR80_BIN)/hello.com
$(call mb-make-call,mb-flow-nestor80-bdos-mono,$(EXAMPLE_HELLO_NESTOR80_BIN),$(EXAMPLE_HELLO_NESTOR80_SRC),hello)
$(call mb-make-call,mb-flow-assert-msxpipe-grep-test,$(EXAMPLE_HELLO_NESTOR80_BIN),$(EXAMPLE_HELLO_NESTOR80_DEPS),check-m80,hello,N80)
$(call mb-make-call,mb-flow-assert-msxpipe-grep-test,$(EXAMPLE_HELLO_NESTOR80_BIN),$(EXAMPLE_HELLO_NESTOR80_DEPS),check-txt,hello,"o MSX world...")
$(call mb-make-call,mb-flow-assert-msxpipe-grep-test,$(EXAMPLE_HELLO_NESTOR80_BIN),$(EXAMPLE_HELLO_NESTOR80_DEPS),check-txt,hello,o MSX world...)