]> git.lyx.org Git - features.git/commitdiff
Refuse to run tex2lyx tests with in-source builds
authorGeorg Baum <baum@lyx.org>
Thu, 17 Sep 2015 20:11:18 +0000 (22:11 +0200)
committerGeorg Baum <baum@lyx.org>
Thu, 17 Sep 2015 20:11:18 +0000 (22:11 +0200)
As Günter found out running the tex2lyx tests overwrites the test references
if the build directory is identical to the source directory. Therefore the
tests would always pass, but git diff would show a non-empty diff if the tests
should have failed. Since it is better anyway to build in a separate directory
we simply do not support srcdir = builddir for the tests and abort with an
error.

src/tex2lyx/Makefile.am

index 7973ea8216e25c3e2e9d28ef301868572f06926e..45c27202a7d4816a8ff280b7a9d2a47c9ccbfd06 100644 (file)
@@ -67,6 +67,10 @@ TEST_RESULTS = \
 alltests: check alltests-recursive
 
 alltests-recursive: tex2lyx
+       if test "$(srcdir)" = "$(builddir)"; then \
+               echo "tex2lyx tests require a separate build directory"; \
+               exit 1; \
+       fi
        @$(PYTHON) "$(srcdir)/test/runtests.py"; \
        if test $$? -eq 0; then \
                echo -e "=====================\ntex2lyx tests passed.\n====================="; \