Commit 00734cae authored by Michele Tartara's avatar Michele Tartara

Add tests for check-news

Unit tests verifying the behaviour of the check-news script are added.

This required adding a new make target, "autotools-check" directly called from
"commit-check", because the usual tests are executed in the build directory,
whereas these, being relative to the autotools, cannot be executed there because
the files of the autotools/ directory are not copied do not belong in the build
directory.
Signed-off-by: default avatarMichele Tartara <mtartara@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 77721d8b
......@@ -103,6 +103,7 @@ DIRS = \
test/data/htools \
test/data/htools/rapi \
test/hs/shelltests \
test/autotools \
lib \
lib/build \
lib/client \
......@@ -1020,6 +1021,7 @@ maninput = \
$(mangen)
TEST_FILES = \
test/autotools/autotools-check-news.test \
test/data/htools/clean-nonzero-score.data \
test/data/htools/common-suffix.data \
test/data/htools/empty-cluster.data \
......@@ -1095,6 +1097,8 @@ TEST_FILES = \
test/data/kvm_0.9.1_help_boot_test.txt \
test/data/kvm_1.0_help.txt \
test/data/kvm_1.1.2_help.txt \
test/data/NEWS_OK.txt \
test/data/NEWS_previous_unreleased.txt \
test/data/ovfdata/compr_disk.vmdk.gz \
test/data/ovfdata/config.ini \
test/data/ovfdata/corrupted_resources.ovf \
......@@ -1142,6 +1146,7 @@ TEST_FILES = \
test/py/gnt-cli.test \
test/py/import-export_unittest-helper
python_tests = \
doc/examples/rapi_testutils.py \
test/py/cfgupgrade_unittest.py \
......@@ -1996,7 +2001,12 @@ live-test: all
--srcdir=.. $(HPCEXCL) ; \
hpc report --srcdir=.. live-test $(HPCEXCL)
commit-check: distcheck lint apidoc
commit-check: autotools-check distcheck lint apidoc
autotools-check:
TESTDATA_DIR=./test/data shelltest $(SHELLTESTARGS) \
$(abs_top_srcdir)/test/autotools/*-*.test \
-- --hide-successes
.PHONY: gitignore-check
gitignore-check:
......
# Test a correct NEWS file against a stable release
RELEASE=2.6.2 ./autotools/check-news < $TESTDATA_DIR/NEWS_OK.txt
>>>= 0
# Test a correct NEWS file against an alpha release
RELEASE=2.8.0~alpha ./autotools/check-news < $TESTDATA_DIR/NEWS_OK.txt
>>>= 0
# Test a NEWS file with previous unreleased versions against a stable release
RELEASE=2.6.2 ./autotools/check-news < $TESTDATA_DIR/NEWS_previous_unreleased.txt
>>>2/Unreleased version after current release 2.6.2/
>>>= !0
# Test a NEWS file with previous unreleased versions against an alpha release
RELEASE=2.8.0~alpha ./autotools/check-news < $TESTDATA_DIR/NEWS_previous_unreleased.txt
>>>= 0
News
====
Version 2.8.0 beta1
-------------------
*(unreleased)*
Incompatible/important changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Stuff
New features
~~~~~~~~~~~~
- More stuff
Version 2.7.0 rc2
-----------------
*(Released Fri, 24 May 2013)*
Incompatible/important changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Other stuff
Since rc1:
- Many bugfixes
Version 2.7.0 rc1
-----------------
*(Released Fri, 3 May 2013)*
- Things
Version 2.7.0 beta1
-------------------
*(Released Wed, 6 Feb 2013)*
This was the first beta release of the 2.7 series. All important changes
are listed in the latest 2.7 entry.
Version 2.6.2
-------------
*(Released Fri, 21 Dec 2012)*
Hic sunt pink bunnies.
Version 2.6.1
-------------
*(Released Fri, 12 Oct 2012)*
Team members come, team members go.
Version 2.6.0
-------------
*(Released Fri, 27 Jul 2012)*
Many things happened before this point.
.. vim: set textwidth=72 syntax=rst :
.. Local Variables:
.. mode: rst
.. fill-column: 72
.. End:
News
====
Version 2.8.0 beta1
-------------------
*(unreleased)*
Incompatible/important changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Stuff
New features
~~~~~~~~~~~~
- More stuff
Version 2.7.0 rc2
-----------------
*(Released Fri, 24 May 2013)*
Incompatible/important changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Other stuff
Since rc1:
- Many bugfixes
Version 2.7.0 rc1
-----------------
*(Released Fri, 3 May 2013)*
- Things
Version 2.7.0 beta1
-------------------
*(Released Wed, 6 Feb 2013)*
This was the first beta release of the 2.7 series. All important changes
are listed in the latest 2.7 entry.
Version 2.6.2
-------------
*(Released Fri, 21 Dec 2012)*
Hic sunt pink bunnies.
Version 2.6.1
-------------
*(unreleased)*
Team members come, team members go.
Version 2.6.0
-------------
*(Released Fri, 27 Jul 2012)*
Many things happened before this point.
.. vim: set textwidth=72 syntax=rst :
.. Local Variables:
.. mode: rst
.. fill-column: 72
.. End:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment