f0797d130f
This patch addresses the functionality that is missing for distributed make test source files. In addition it extends the concept of colocating test source code with functional source code (eg. src/vcl/test). It also cleans up deficiencies in the make test makefiles. NOTE: Due to the way sphinx document tools work, all test, all of the make test python code is gathered using soft links into the directory: .../build-root/build-test/src Change summary: - Remove 'make test' help details from main makefile help output to reduce clutter and redundant help output - Move all generated build output to .../build-root/build-test - Move test_vcl.py as first usecase for distributed core feature make test code - Add test-wipe-all target and fix wipe targets to remove all generated files - Fix 'make test-doc' to generate module documentation for all source files - Remove unused targets in test/doc/Makefile - Fix 'make test-shell' - Fix test/ext Makefile to not generate bogus output Type: fix Fixes: a43c93f8554ad7418e31be3791b3fb71232f60ac Change-Id: Icc2ddb81d474081c3ede4548ecd7a0624651f62d Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
40 lines
1.1 KiB
Makefile
40 lines
1.1 KiB
Makefile
# Makefile for VPP Test documentation
|
|
#
|
|
|
|
SPHINXOPTS =
|
|
SRC_DOC_DIR = $(TEST_DIR)/doc
|
|
SPHINXBUILD = sphinx-build
|
|
HTML_DOC_GEN_DIR = $(TEST_DOC_BR)/html
|
|
API_DOC_GEN_DIR = $(TEST_DOC_BR)/api
|
|
|
|
# Internal variables.
|
|
ALLSPHINXOPTS = -d $(TEST_DOC_BR)/.sphinx-cache $(SPHINXOPTS) $(API_DOC_GEN_DIR) -c $(SRC_DOC_DIR)
|
|
IN_VENV:=$(shell if pip -V | grep "venv" 2>&1 > /dev/null; then echo 1; else echo 0; fi)
|
|
|
|
.PHONY: verify-virtualenv
|
|
verify-virtualenv:
|
|
ifndef TEST_DIR
|
|
$(error TEST_DIR is not set)
|
|
endif
|
|
ifndef TEST_DOC_BR
|
|
$(error TEST_DOC_BR is not set)
|
|
endif
|
|
ifndef BUILD_TEST_SRC
|
|
$(error BUILD_TEST_SRC is not set)
|
|
endif
|
|
ifeq ($(IN_VENV),0)
|
|
$(error "Not running inside virtualenv (are you running 'make test-doc' from root?)")
|
|
endif
|
|
|
|
.PHONY: regen-api-doc
|
|
regen-api-doc: verify-virtualenv
|
|
@mkdir -p $(API_DOC_GEN_DIR)
|
|
@cp $(SRC_DOC_DIR)/index.rst $(API_DOC_GEN_DIR)
|
|
@cp $(SRC_DOC_DIR)/indices.rst $(API_DOC_GEN_DIR)
|
|
@cp $(SRC_DOC_DIR)/overview.rst $(API_DOC_GEN_DIR)
|
|
sphinx-apidoc -o $(API_DOC_GEN_DIR) -H "Module documentation" $(BUILD_TEST_SRC)
|
|
|
|
.PHONY: html
|
|
html: regen-api-doc verify-virtualenv
|
|
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(HTML_DOC_GEN_DIR)
|