From 3f8b45a8c0cc87b9f6d79c10e1b73c00adb7ce4e Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 4 Aug 2015 21:20:28 -0400 Subject: [PATCH] Fix search for docs tox job in run-docs.sh The run-docs.sh script was checking for a tox job using the tox -l/--listenvs flag. However this only shows jobs that are listed in the envlist variable in the tox.ini. The docs job is not normally put in this variable because it's what is used to define the default set of jobs run when you just run 'tox' without any args. This commit changes the if check to search the entire tox config for any jobs listed in the configuration labeled docs. This should pick up docs tox jobs more reliably. Change-Id: Ieeccba08fe7960206864723e6f13a10309cfacf3 --- jenkins/scripts/run-docs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/scripts/run-docs.sh b/jenkins/scripts/run-docs.sh index c18212dafe..fd5ff584f6 100755 --- a/jenkins/scripts/run-docs.sh +++ b/jenkins/scripts/run-docs.sh @@ -9,7 +9,7 @@ mkdir -p doc/build export HUDSON_PUBLISH_DOCS=1 -if [ "`tox -l | grep docs`" = "docs" ]; then +if [ $(tox --showconfig | grep -c "\[testenv:docs\]") == 1 ]; then venv=docs tox -e$venv else