diff --git a/test/spec/Readme.adoc b/test/spec/Readme.adoc deleted file mode 100644 index 17a747449..000000000 --- a/test/spec/Readme.adoc +++ /dev/null @@ -1,44 +0,0 @@ -:topdoc: - -= Test specification -This is the test specification for Infix. -:title-page: -:toc: -:toclevels: 2 -:sectnums: -:sectnumlevels: 2 - -<<< -include::../case/misc/Readme.adoc[] - -<<< - -include::../case/ietf_system/Readme.adoc[] - -<<< - -include::../case/ietf_syslog/Readme.adoc[] - -<<< - -include::../case/ietf_interfaces/Readme.adoc[] - -<<< - -include::../case/ietf_routing/Readme.adoc[] - -<<< - -include::../case/infix_containers/Readme.adoc[] - -<<< - -include::../case/infix_dhcp/Readme.adoc[] - -<<< - -include::../case/ietf_hardware/Readme.adoc[] - -<<< - -include::../case/infix_services/Readme.adoc[] diff --git a/test/spec/Readme.adoc.in b/test/spec/Readme.adoc.in index 1c0e62cce..0b26bd01a 100644 --- a/test/spec/Readme.adoc.in +++ b/test/spec/Readme.adoc.in @@ -1,7 +1,7 @@ :topdoc: = Test specification -This is the test specification for {REPLACE}. +{REPLACE} :title-page: :toc: :toclevels: 2 diff --git a/test/test.mk b/test/test.mk index 9f9b8a400..4631c46e5 100644 --- a/test/test.mk +++ b/test/test.mk @@ -4,8 +4,14 @@ ninepm := $(BR2_EXTERNAL_INFIX_PATH)/test/9pm/9pm.py spec-dir := $(test-dir)/spec test-specification := $(O)/images/test-specification.pdf -UNIT_TESTS ?= $(test-dir)/case/all-repo.yaml $(test-dir)/case/all-unit.yaml -TESTS ?= $(test-dir)/case/all.yaml +UNIT_TESTS ?= $(test-dir)/case/all-repo.yaml $(test-dir)/case/all-unit.yaml +TESTS ?= $(test-dir)/case/all.yaml +ifeq ($INFIX_OEM_PATH), "") +GIT_PATH = $(INFIX_OEM_PATH) +else +GIT_PATH = $(BR2_EXTERNAL_INFIX_PATH) +endif +GIT_VERSION = $(shell git -C $(GIT_PATH) describe --dirty --always --tags) IMAGE ?= infix TOPOLOGY-DIR ?= $(test-dir)/virt/quad @@ -34,7 +40,7 @@ test-sh: $(test-dir)/env $(base) $(mode) $(binaries) -i /bin/sh test-spec: - @sed 's/{REPLACE}/$(subst ",,$(INFIX_NAME))/' $(spec-dir)/Readme.adoc.in > $(spec-dir)/Readme.adoc + @sed 's/{REPLACE}/$(subst ",,$(INFIX_NAME)) $(GIT_VERSION)/' $(spec-dir)/Readme.adoc.in > $(spec-dir)/Readme.adoc @$(spec-dir)/generate_spec.py -d $(test-dir)/case -r $(BR2_EXTERNAL_INFIX_PATH) @asciidoctor-pdf --failure-level INFO --theme $(spec-dir)/theme.yml -a pdf-fontsdir=$(spec-dir)/fonts -o $(test-specification) $(spec-dir)/Readme.adoc