aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo Zimmermann2019-05-08 20:51:31 +0200
committerThéo Zimmermann2019-05-08 20:51:31 +0200
commit963b950f201614078a432d1ac7568e8757d8df19 (patch)
tree28b87d9d3cbabb85146305a6a9777e7dc360f6d6
parent50a89e6882e319cf6107147b49d387dd41e81805 (diff)
Add a test that unreleased changelog of released versions is empty.
This test is active only when configure `is_a_released_version` is set to true. In this case, to pass the test-suite, there must be no unreleased changelog entries left, i.e. `doc/changelog/*/` must only contain `00000-title.rst` files.
-rw-r--r--test-suite/dune2
-rwxr-xr-xtest-suite/misc/changelog.sh18
2 files changed, 20 insertions, 0 deletions
diff --git a/test-suite/dune b/test-suite/dune
index c430400ba5..cd33319fa4 100644
--- a/test-suite/dune
+++ b/test-suite/dune
@@ -20,6 +20,8 @@
../dev/header.ml
../dev/tools/update-compat.py
../doc/stdlib/index-list.html.template
+ ; For the changelog test
+ ../config/coq_config.py
(package coq)
; For fake_ide
(package coqide-server)
diff --git a/test-suite/misc/changelog.sh b/test-suite/misc/changelog.sh
new file mode 100755
index 0000000000..8b4a49e577
--- /dev/null
+++ b/test-suite/misc/changelog.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+while read line; do
+ if [ "$line" = "is_a_released_version = False" ]; then
+ echo "This is not a released version: nothing to test."
+ exit 0
+ fi
+done < ../config/coq_config.py
+
+for d in ../doc/changelog/*; do
+ if [ -d "$d" ]; then
+ if [ "$(ls $d/*.rst | wc -l)" != "1" ]; then
+ echo "Fatal: unreleased changelog entries remain in ${d#../}/"
+ echo "Include them in doc/sphinx/changes.rst and remove them from doc/changelog/"
+ exit 1
+ fi
+ fi
+done