Skip to content

Commit

Permalink
test:spec: Add version of Infix/OEM build
Browse files Browse the repository at this point in the history
Show the version of the infix build, for traceability

This fix #744

Signed-off-by: Mattias Walström <[email protected]>
  • Loading branch information
mattiaswal committed Oct 23, 2024
1 parent 19d5f1d commit 6868d71
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 48 deletions.
44 changes: 0 additions & 44 deletions test/spec/Readme.adoc

This file was deleted.

2 changes: 1 addition & 1 deletion test/spec/Readme.adoc.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:topdoc:

= Test specification
This is the test specification for {REPLACE}.
{REPLACE}
:title-page:
:toc:
:toclevels: 2
Expand Down
12 changes: 9 additions & 3 deletions test/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 6868d71

Please sign in to comment.