diff --git a/.travis.yml b/.travis.yml index 7351123..f079b71 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,10 @@ python: ["2.7"] sudo: false env: - - PYTHON_TESTS=true TEST_SITE=false - - PYTHON_TESTS=false TEST_SITE=docs - - PYTHON_TESTS=false TEST_SITE=test_site - - PYTHON_TESTS=false TEST_SITE=OSULUG/OSULUG-website + - PYTHON_TESTS=true TEST_SITE=false CMP_OUTPUT=false + - PYTHON_TESTS=false TEST_SITE=docs CMP_OUTPUT=false + - PYTHON_TESTS=false TEST_SITE=test_site CMP_OUTPUT=true + - PYTHON_TESTS=false TEST_SITE=OSULUG/OSULUG-website CMP_OUTPUT=false script: - bin/python-tests diff --git a/bin/site-tests b/bin/site-tests index 903ed80..1277a93 100755 --- a/bin/site-tests +++ b/bin/site-tests @@ -26,5 +26,15 @@ fi echo "Testing site $TEST_SITE" cd $TEST_SITE -wok -v -exit $? +EXPECTED_FILE=wok_expected_output-${TEST_SITE} +OUTPUT_FILE=wok_output_travis-ci.${TEST_SITE}.`date +%Y%m%d-%H%M%S`.txt +wok -v > $OUTPUT_FILE 2>&1 +rc=$? + +if [ -n "$CMP_OUTPUT" -a "$CMP_OUTPUT" = "true" ]; then + echo "Comparing output $EXPECTED_FILE $OUTPUT_FILE" + cmp $EXPECTED_FILE $OUTPUT_FILE + rc=$? +fi + +exit $rc diff --git a/test_site/wok_expected_output-test_site b/test_site/wok_expected_output-test_site new file mode 100644 index 0000000..2c5a7a8 --- /dev/null +++ b/test_site/wok_expected_output-test_site @@ -0,0 +1,7 @@ +WARNING:root:Textile not enabled. +WARNING:root:HTML rendering relies on the BeautifulSoup library. +WARNING:root:To use compile_sass hook, you must install libsass-python package. +WARNING:root:No parser found for html_renderer.html. Using default renderer. +ERROR:root:It looks like the page "content/tests/dates1.mkd" is an orphan! This will probably cause problems. +ERROR:root:It looks like the page "content/tests/dates2.mkd" is an orphan! This will probably cause problems. +ERROR:root:It looks like the page "content/tests/dates3.mkd" is an orphan! This will probably cause problems.