add a new Travis CI check that 'make alldepend' is a no-op
parent
a5b6fd198a
commit
cdccc0b1cb
|
@ -54,6 +54,7 @@ matrix:
|
||||||
XARCH=x64
|
XARCH=x64
|
||||||
CONFIG_ARG=--enable-dependency-generation
|
CONFIG_ARG=--enable-dependency-generation
|
||||||
MAKE_ARG=-j
|
MAKE_ARG=-j
|
||||||
|
- env: CI_KIND=check-depend
|
||||||
- env: CI_KIND=changes
|
- env: CI_KIND=changes
|
||||||
- env: CI_KIND=manual
|
- env: CI_KIND=manual
|
||||||
- env: CI_KIND=check-typo
|
- env: CI_KIND=check-typo
|
||||||
|
|
|
@ -78,6 +78,39 @@ case $TRAVIS_EVENT_TYPE in
|
||||||
TRAVIS_MERGE_BASE=$(git merge-base "$TRAVIS_CUR_HEAD" "$TRAVIS_PR_HEAD");;
|
TRAVIS_MERGE_BASE=$(git merge-base "$TRAVIS_CUR_HEAD" "$TRAVIS_PR_HEAD");;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
CheckDepend () {
|
||||||
|
cat<<EOF
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
This test checks that 'alldepend' target is a no-op in the current
|
||||||
|
state, which means that dependencies are correctly stored in .depend
|
||||||
|
files. It should only be run after the compiler has been built.
|
||||||
|
If this check fails, it should be fixable by just running 'make alldepend'.
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
EOF
|
||||||
|
./configure --disable-dependency-generation \
|
||||||
|
--disable-debug-runtime \
|
||||||
|
--disable-instrumented-runtime
|
||||||
|
# Need a runtime
|
||||||
|
$MAKE -j coldstart
|
||||||
|
# And generated files (ocamllex compiles ocamlyacc)
|
||||||
|
$MAKE -j ocamllex
|
||||||
|
$MAKE alldepend
|
||||||
|
# note: we cannot use $? as (set -e) may be set globally,
|
||||||
|
# and disabling it locally is not worth the hassle.
|
||||||
|
# note: we ignore the whitespace in case different C dependency
|
||||||
|
# detectors use different indentation styles.
|
||||||
|
git diff --ignore-all-space --quiet --exit-code **.depend \
|
||||||
|
&& result=pass || result=fail
|
||||||
|
case $result in
|
||||||
|
pass)
|
||||||
|
echo "CheckDepend: success";;
|
||||||
|
fail)
|
||||||
|
echo "CheckDepend: failure on the following files:"
|
||||||
|
git --no-pager diff --ignore-all-space --name-only **.depend
|
||||||
|
exit 1;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
BuildAndTest () {
|
BuildAndTest () {
|
||||||
mkdir -p $PREFIX
|
mkdir -p $PREFIX
|
||||||
cat<<EOF
|
cat<<EOF
|
||||||
|
@ -356,6 +389,8 @@ tests)
|
||||||
check-typo)
|
check-typo)
|
||||||
set +x
|
set +x
|
||||||
CheckTypo;;
|
CheckTypo;;
|
||||||
|
check-depend)
|
||||||
|
CheckDepend;;
|
||||||
*) echo unknown CI kind
|
*) echo unknown CI kind
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue