Auto setup module flow and packages as targets.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -13s
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -13s
This commit is contained in:
parent
f0cccf2bb3
commit
c13a26d6b5
28 changed files with 420 additions and 259 deletions
|
|
@ -1,12 +1,16 @@
|
|||
|
||||
define __mb_flow_assert_grep_binary_x
|
||||
.RECIPEPREFIX := $(MB_@RECIPE)
|
||||
$(1)/$(5)-$(2): $(1)/@build
|
||||
|
||||
$(1)/@@$(5)-deps:: $(1)/@assert/$(5)/$(2)
|
||||
|
||||
$(1)/@assert/$(5)/$(2): $(1)/@build
|
||||
$(MB_@RECIPE)grep -q -U $(4) $(1)/$(3)
|
||||
$(MB_@RECIPE)$$(call mb_make_call,mb_os_echo_assert,$$(MB_I18N_ASSERT_SUCCESS) v-$(2))
|
||||
$(MB_ᕽᕽᕽ )$$(call mb_make_call,mb_doc_target,$(1)/$(5)-$(2),"Asserts that $(3) output matches.")
|
||||
$(MB_ᕽᕽᕽ )$$(call mb_make_call,mb_make_target_phony,$(1)/$(5)-$(2))
|
||||
$(MB_ᕽᕽᕽ )$$(call mb_make_call,mb_proj_grow_deps_phase,$(5),$(1)/$(5)-$(2))
|
||||
$(MB_@RECIPE)$$(call mb_make_call,mb_os_echo_assert,$$(MB_I18N_ASSERT_SUCCESS) $(1)/@assert/$(2)/$(5))
|
||||
$(MB_ᕽᕽᕽ )$$(call mb_make_call,mb_doc_target,$(1)/@assert/$(5)/$(2),"Asserts that $(3) output matches.")
|
||||
$(MB_ᕽᕽᕽ )$$(call mb_make_call,mb_make_target_phony,$(1)/@assert/$(5)/$(2))
|
||||
$(MB_ᕽᕽᕽ )$$(call mb_make_call,mb_proj_grow_deps_phase,$(5),$(1)/@assert/$(5)/$(2))
|
||||
|
||||
.RECIPEPREFIX := $(MB_@RECIPEPREFIX)
|
||||
endef
|
||||
define mb_flow_assert_grep_binary_test
|
||||
|
|
@ -20,26 +24,39 @@ $(MB_ᕽᕽᕽ )$(eval $(call mb_make_call,__mb_flow_assert_grep_binary_
|
|||
endef
|
||||
$(call mb_make_call,mb_doc_function_flow,mb_flow_assert_grep_binary_package_qa,"Inject flow of single binary grep assert.","<build-dir> <test-id> <file> <grep-match>")
|
||||
|
||||
#$$(call mb_delete,$(1)/$(3).out)
|
||||
define __mb_assert_flow_bdos_grep
|
||||
define __mb_flow_assert_msxpipe_grep_x2
|
||||
$(MB_ᕽᕽᕽ )$(shell grep -q $(1) $(2) && echo || echo fail)
|
||||
endef
|
||||
|
||||
|
||||
define __mb_flow_assert_msxpipe_grep_x
|
||||
.RECIPEPREFIX := $(MB_@RECIPE)
|
||||
$(1)-test-$(2)/@assert: $(1)/@build
|
||||
$(MB_@RECIPE)$$(call mb_make_call,mb_os_dir_create,$(1)-test-$(2))
|
||||
$(MB_@RECIPE)$$(call mb_make_call,mb_os_file_copy,$(1)/$(3).com,$(1)-test-$(2))
|
||||
$(MB_@RECIPE)$$(call mb_make_call,mb_msxpipe_safe_test,$(1)-test-$(2),$(3) > $(3).out,$(5))
|
||||
$(MB_@RECIPE)grep -q $(4) $(1)-test-$(2)/$(3).out
|
||||
$(MB_@RECIPE)$$(call mb_make_call,mb_os_echo_assert,$$(MB_I18N_ASSERT_SUCCESS) $(1)-test-$(2)/@assert)
|
||||
$(MB_ᕽᕽᕽ )$$(call mb_make_call,mb_doc_target,$(1)-test-$(2)/@assert,"Asserts that $(3) output matches.")
|
||||
$(MB_ᕽᕽᕽ )$$(call mb_make_call,mb_make_target_phony,$(1)-test-$(2)/@assert)
|
||||
$(MB_ᕽᕽᕽ )$$(call mb_make_call,mb_proj_grow_deps_phase,@test,$(1)-test-$(2)/@assert)
|
||||
|
||||
$(1)/@@$(5)-deps:: $(1)/@assert/$(5)/$(2)
|
||||
$(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)$$(call mb_make_call,mb_os_echo_assert,$$(MB_I18N_ASSERT_SUCCESS) $(1)/@assert/$(2)/$(5))
|
||||
$(MB_ᕽᕽᕽ )$$(call mb_make_call,mb_doc_target,$(1)/@assert/$(5)/$(2),"Asserts that $(3) output matches.")
|
||||
$(MB_ᕽᕽᕽ )$$(call mb_make_call,mb_make_target_phony,$(1)/@assert/$(5)/$(2))
|
||||
$(MB_ᕽᕽᕽ )$$(call mb_make_call,mb_proj_grow_deps_phase,$(5),$(1)/@assert/$(5)/$(2))
|
||||
|
||||
.RECIPEPREFIX := $(MB_@RECIPEPREFIX)
|
||||
endef
|
||||
|
||||
#$(call mb_make_call,mb_flow_clone_deps,$(DIST_QA_MSX1_BIN),$(DIST_BIN),$(DIST_DEPS),$(DIST_QA_MSX1_MACHINE))
|
||||
define mb_assert_flow_bdos_grep
|
||||
$(MB_ᕽᕽᕽ )$(call mb_make_call,mb_make_check_arg4,mb_assert_flow_bdos_grep,$(1),$(2),$(3),$(4))
|
||||
$(MB_ᕽᕽᕽ )$(eval $(call mb_make_call,__mb_assert_flow_bdos_grep,$(1),$(2),$(3),$(4),$(5)))
|
||||
define mb_flow_assert_msxpipe_grep_test
|
||||
$(MB_ᕽᕽᕽ )$(call mb_make_call,mb_make_check_arg5,$(0),$(1),$(2),$(3),$(4),$(5))
|
||||
$(MB_ᕽᕽᕽ )$(eval $(call mb_make_call,mb_flow_clone_deps,$(1)-assert/@test-$(3),$(1),$(2),$(6),$(7)))
|
||||
$(MB_ᕽᕽᕽ )$(eval $(call mb_make_call,__mb_flow_assert_msxpipe_grep_x,$(1),$(3),$(4),$(5),@test,$(7),$(1)-assert/@test-$(3)))
|
||||
endef
|
||||
$(call mb_make_call,mb_doc_function_flow,mb_assert_flow_bdos_grep,"Inject flow of single grep assert.","<build-dir> <test-id> <cmd-name> <grep-match> [machine]")
|
||||
$(call mb_make_call,mb_doc_function_flow,mb_flow_assert_msxpipe_grep_test,"Inject flow of single grep assert.","<build-dir> <deps> <test-id> <cmd-name> <grep-match> [packages] [machine]")
|
||||
define mb_flow_assert_msxpipe_grep_package_qa
|
||||
$(MB_ᕽᕽᕽ )$(call mb_make_call,mb_make_check_arg5,$(0),$(1),$(2),$(3),$(4),$(5))
|
||||
$(MB_ᕽᕽᕽ )$(eval $(call mb_make_call,mb_flow_clone_deps,$(1)-assert/@package-qa-$(3),$(1),$(2),$(6),$(7)))
|
||||
$(MB_ᕽᕽᕽ )$(eval $(call mb_make_call,__mb_flow_assert_msxpipe_grep_x,$(1),$(3),$(4),$(5),@package-qa,$(7),$(1)-assert/@package-qa-$(3)))
|
||||
endef
|
||||
$(call mb_make_call,mb_doc_function_flow,mb_flow_assert_msxpipe_grep_package_qa,"Inject flow of single grep assert.","<build-dir> <deps> <test-id> <cmd-name> <grep-match> [packages] [machine]")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue