From 455301ca133649138ae8c07b12111e3a656423a5 Mon Sep 17 00:00:00 2001 From: "K.Kanakhin" Date: Fri, 21 Oct 2016 13:19:33 +0600 Subject: [PATCH] docs-test: Add documentation test scripts to backend test case. - Add script to compile documentation build and start crawler to check documentation. - Add documentation test script to backend travis test case. - Add log level argument to test-documentation script. Fixes #1492 --- tools/test-all | 2 ++ tools/test-documentation | 20 ++++++++++++++++++++ tools/travis/backend | 1 + 3 files changed, 23 insertions(+) create mode 100755 tools/test-documentation diff --git a/tools/test-all b/tools/test-all index a354c9dc36..edaa7c0f25 100755 --- a/tools/test-all +++ b/tools/test-all @@ -26,5 +26,7 @@ run ./tools/test-js-with-casper # run ./tools/test-management # Not running queue worker reload tests since it's low-churn code # run ./tools/test-queue-worker-reload +# Not running documentation tests since it takes 20s and only tests documentation +# run ./tools/test-documentation printf '\n\e[32mAll OK!\e[0m\n' diff --git a/tools/test-documentation b/tools/test-documentation new file mode 100755 index 0000000000..0f9b81f6c8 --- /dev/null +++ b/tools/test-documentation @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -e + + +case $1 in + -h|--help) + echo "--help, -h show this help message and exit" + echo "--loglevel=LEVEL, -L LEVEL log level (default: ERROR)" + exit 0 + ;; + -L|--loglevel) + loglevel="$1 $2" + ;; +esac + +cd "$(dirname "$0")"/../docs +make html +cd ../tools/documentation_crawler + +scrapy crawl_with_status documentation_crawler $loglevel diff --git a/tools/travis/backend b/tools/travis/backend index da323e4d31..873fdf8bd5 100755 --- a/tools/travis/backend +++ b/tools/travis/backend @@ -11,3 +11,4 @@ set -x ./tools/test-migrations ./tools/test-run-dev #./tools/test-queue-worker-reload +./tools/test-documentation