view tests/check-gendoc @ 35066:57d56f603f70

run-tests: fix TESTDIR if testdescs are absolute paths Commit a18eef03d879 made TESTDIR be the location of the arguments that were passed to run-tests.py instead of just PWD. It assumed that these tests were specified using relative paths, so if pwd was /tmp/foo, and the first argument was /tmp/baz, it would set TESTDIR to /tmp/foo//tmp/baz. Differential Revision: https://phab.mercurial-scm.org/D1433
author Kyle Lippincott <spectral@google.com>
date Wed, 15 Nov 2017 17:54:27 -0800
parents 7a1ad08b9ff5
children 69c99898a48f
line wrap: on
line source

#!/bin/sh
HGENCODING=UTF-8
export HGENCODING

echo ".. -*- coding: utf-8 -*-" > gendoc.txt
echo "" >> gendoc.txt
LANGUAGE=$1 python "$TESTDIR/../doc/gendoc.py" >> gendoc.txt 2> /dev/null || exit

echo "checking for parse errors"
python "$TESTDIR/../doc/docchecker" gendoc.txt
python "$TESTDIR/../doc/runrst" html gendoc.txt /dev/null