Generate the documents for test cases and libraries.
- Use the phony to force execute the gendocs target (ignore directory
exist).
- Use for loop to find all robot files and then create documents.
Change-Id: Ia5686a559b78dd506aca0b79f0bce0fba4b14c5a
diff --git a/Makefile b/Makefile
index 66626ce..60d61a5 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,18 @@
ROBOT_ONU_SN=-v BBSIM_ONU_SN:$(BBSIM_ONU_SN)
endif
+.PHONY: gendocs
+
+## Variables for gendocs
+TEST_SOURCE := $(wildcard tests/*/*.robot)
+TEST_BASENAME := $(basename $(TEST_SOURCE))
+TEST_DIRS := $(dir $(TEST_SOURCE))
+
+LIB_SOURCE := $(wildcard libraries/*.robot)
+LIB_BASENAME := $(basename $(LIB_SOURCE))
+LIB_DIRS := $(dir $(LIB_SOURCE))
+
+
sanity-kind: ROBOT_PORT_ARGS ?= -v ONOS_REST_PORT:8181 -v ONOS_SSH_PORT:8101
sanity-kind: ROBOT_TEST_ARGS ?= --exclude notready --critical sanity
sanity-kind: ROBOT_MISC_ARGS ?= -v num_onus:1
@@ -61,12 +73,19 @@
cd tests/sanity ;\
robot $(ROBOT_PORT_ARGS) $(ROBOT_TEST_ARGS) $(ROBOT_MISC_ARGS) $(ROBOT_OLT_SN) $(ROBOT_ONU_SN) sanity.robot
+
gendocs: vst_venv
source ./vst_venv/bin/activate ;\
set -u ;\
- mkdir -p gendocs ;\
- python -m robot.libdoc --format HTML libraries/onos.robot gendocs/lib_onos_robot.html ;\
- python -m robot.testdoc tests/Voltha_PODTests.robot gendocs/voltha_podtests.html
+ mkdir -p $@ ;\
+ for dir in ${LIB_DIRS}; do mkdir -p $@/$$dir; done;\
+ for dir in ${LIB_BASENAME}; do\
+ python -m robot.libdoc --format HTML $$dir.robot $@/$$dir.html ;\
+ done ;\
+ for dir in ${TEST_DIRS}; do mkdir -p $@/$$dir; done;\
+ for dir in ${TEST_BASENAME}; do\
+ python -m robot.testdoc $$dir.robot $@/$$dir.html ;\
+ done
# explore use of --docformat REST - integration w/Sphinx?
clean:
diff --git a/README.md b/README.md
index f974508..73067af 100644
--- a/README.md
+++ b/README.md
@@ -43,15 +43,18 @@
and [the Go programming language](https://golang.org/doc/install).
Then run the following commands:
+Note: Please make sure you are able to run the docker command, you can run as root or add your running user into docker group.
+
```bash
git clone https://github.com/ciena/kind-voltha
cd kind-voltha
-EXTRA_HELM_FLAGS="--set defaults.image_tag=voltha-2.1” TYPE=minimal WITH_RADIUS=y WITH_BBSIM=y INSTALL_ONOS_APPS=y CONFIG_SADIS=y ./voltha up
+EXTRA_HELM_FLAGS="--set defaults.image_tag=voltha-2.1" TYPE=minimal WITH_RADIUS=y WITH_BBSIM=y INSTALL_ONOS_APPS=y CONFIG_SADIS=y ./voltha up
source minimal-env.sh
```
The `defaults.image_tag` value above is used to specify which VOLTHA
branch images to pull from Docker Hub.
+See all available versions in [Docker voltha](https://hub.docker.com/u/voltha/).
## Running the sanity tests