[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Autoconf source repository branch, master, updated. v2.63b-89-
From: |
Eric Blake |
Subject: |
[SCM] GNU Autoconf source repository branch, master, updated. v2.63b-89-g0f48062 |
Date: |
Thu, 23 Jul 2009 12:49:21 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".
http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=0f4806215f23b8e46518d9b7303c5e5c5adbf593
The branch, master has been updated
via 0f4806215f23b8e46518d9b7303c5e5c5adbf593 (commit)
from 25853e5836109cf5a5113372ed578a0bb2950886 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0f4806215f23b8e46518d9b7303c5e5c5adbf593
Author: Romain Lenglet <address@hidden>
Date: Thu Jul 23 06:47:52 2009 -0600
Add autotests for Erlang macros.
* tests/erlang.at: Added tests for all macros in erlang.m4.
* tests/Makefile.am: Added erlang.at.
* tests/suite.at: Likewise.
* tests/compile.at: Added test for extension of Erlang files.
* NEWS: Mention this.
Signed-off-by: Eric Blake <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 9 ++
NEWS | 2 +
tests/Makefile.am | 3 +-
tests/compile.at | 34 +++++----
tests/erlang.at | 214 +++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/suite.at | 1 +
6 files changed, 248 insertions(+), 15 deletions(-)
create mode 100644 tests/erlang.at
diff --git a/ChangeLog b/ChangeLog
index 4b9fb5c..dac5b0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-07-23 Romain Lenglet <address@hidden>
+
+ Add autotests for Erlang macros.
+ * tests/erlang.at: Added tests for all macros in erlang.m4.
+ * tests/Makefile.am: Added erlang.at.
+ * tests/suite.at: Likewise.
+ * tests/compile.at: Added test for extension of Erlang files.
+ * NEWS: Mention this.
+
2009-07-22 Eric Blake <address@hidden>
Fix test of autom4te from stdin.
diff --git a/NEWS b/NEWS
index ef67c77..ec63834 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,8 @@ GNU Autoconf NEWS - User visible changes.
m4_argn m4_copy_force m4_default_nblank m4_default_nblank_quoted
m4_ifblank m4_ifnblank m4_rename_force
+** The autoconf testsuite now validates all Erlang macros.
+
* Major changes in Autoconf 2.63b (2009-03-31) [beta]
Released by Eric Blake, based on git versions 2.63.*.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f07c553..085c9d1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -100,7 +100,7 @@ TESTSUITE_HAND_AT = \
suite.at \
m4sugar.at m4sh.at autotest.at \
base.at tools.at torture.at \
- compile.at c.at fortran.at \
+ compile.at c.at erlang.at fortran.at \
semantics.at \
autoscan.at \
foreign.at
@@ -168,6 +168,7 @@ AUTOCONF_FILES = $(autoconfdir)/general.m4 \
$(autoconfdir)/functions.m4 \
$(autoconfdir)/lang.m4 \
$(autoconfdir)/c.m4 \
+ $(autoconfdir)/erlang.m4 \
$(autoconfdir)/fortran.m4 \
$(autoconfdir)/headers.m4 \
$(autoconfdir)/libs.m4 \
diff --git a/tests/compile.at b/tests/compile.at
index 20398fb..9675539 100644
--- a/tests/compile.at
+++ b/tests/compile.at
@@ -35,23 +35,27 @@ AT_SETUP([[AC_LANG, AC_LANG_PUSH & AC_LANG_POP]])
AT_DATA([configure.ac],
[[AC_INIT
# C
-AC_LANG(C)
+AC_LANG([C])
# C
-AC_LANG_PUSH(C)
+AC_LANG_PUSH([C])
# C C
-AC_LANG_PUSH(C++)
+AC_LANG_PUSH([C++])
# C++ C C
-AC_LANG(C++)
+AC_LANG([C++])
# C++ C C
-AC_LANG_PUSH(Fortran 77)
-# F77 C++ C C
-AC_LANG_POP(Fortran 77)
+AC_LANG_PUSH([Erlang])
+# Erlang C++ C C
+AC_LANG_PUSH([Fortran 77])
+# F77 Erlang C++ C C
+AC_LANG_POP([Fortran 77])
+# Erlang C++ C C
+AC_LANG_POP([Erlang])
# C++ C C
-AC_LANG(C++)
+AC_LANG([C++])
# C++ C C
-AC_LANG_POP(C++)
+AC_LANG_POP([C++])
# C C
-AC_LANG_POP(C)
+AC_LANG_POP([C])
# C
]])
@@ -62,7 +66,9 @@ c
c
cpp
cpp
+erl
f
+erl
cpp
cpp
c
@@ -243,16 +249,16 @@ AT_DATA([configure.ac],
AC_PROG_CC
AC_PROG_CXX
-AC_LANG_PUSH(C)
+AC_LANG_PUSH([C])
AC_MSG_CHECKING([a simple C program that is not valid C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([enum a { A, B, C };
enum a f(enum a in) { return in++; }], [])],
[AC_MSG_RESULT([ok])],
[AC_MSG_RESULT([failed])
AC_MSG_ERROR([could not compile test program])])
-AC_LANG_POP(C)
+AC_LANG_POP([C])
-AC_LANG_PUSH(C++)
+AC_LANG_PUSH([C++])
AC_MSG_CHECKING([a simple C++ program that is not valid C])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([class A {};], [])],
[AC_MSG_RESULT([ok])],
@@ -260,7 +266,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([class A {};], [])],
AC_MSG_ERROR([could not compile test program])])
AC_CHECK_HEADER([cstring])
-AC_LANG_POP(C++)
+AC_LANG_POP([C++])
]])
AT_CHECK_AUTOCONF
diff --git a/tests/erlang.at b/tests/erlang.at
new file mode 100644
index 0000000..f3ced24
--- /dev/null
+++ b/tests/erlang.at
@@ -0,0 +1,214 @@
+# -*- Autotest -*-
+
+AT_BANNER([Erlang low level compiling and utility macros.])
+
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+
+# Since the macros which compile are required by most tests, check
+# them first. But remember that looking for a compiler is even more
+# primitive, so check those first.
+
+
+# AT_SETUP_ERLANG(title)
+# ----------------------
+# Setup a test group for Erlang, named TITLE.
+m4_define([AT_SETUP_ERLANG],
+[AT_SETUP([$1])
+AT_KEYWORDS([Erlang])
+found_erl=no
+found_erlc=no
+_AS_PATH_WALK([], [
+if AS_EXECUTABLE_P(["$as_dir/erl"]); then found_erl=yes; fi
+if AS_EXECUTABLE_P(["$as_dir/erlc"]); then found_erlc=yes; fi
+if test "${found_erl}${found_erlc}" = "yesyes"; then break; fi
+])
+AT_SKIP_IF([test "$found_erl$found_erlc" != "yesyes"])])
+
+
+## ----------------- ##
+## Erlang Compiler. ##
+## ----------------- ##
+
+AT_SETUP_ERLANG([Erlang])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_ERLANG_NEED_ERL
+AC_ERLANG_NEED_ERLC
+AC_LANG([Erlang])
+## Can't compile, but can run an Erlang module:
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [halt(0)])],
+ [AC_MSG_RESULT([ok])
+ AC_MSG_ERROR([compiling Erlang program should fail])],
+ [AC_MSG_RESULT([failed])])
+AC_RUN_IFELSE([AC_LANG_PROGRAM([], [halt(0)])],
+ [AC_MSG_RESULT([ok])],
+ [AC_MSG_RESULT([failed])
+ AC_MSG_ERROR([could not run test program])])
+]])
+
+AT_CHECK_AUTOCONF
+AT_CHECK_CONFIGURE([-q])
+
+AT_CLEANUP
+
+
+## ----------------------- ##
+## Erlang path detection. ##
+## ----------------------- ##
+
+AT_SETUP_ERLANG([AC_ERLANG_CHECK_LIB])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_ERLANG_NEED_ERL
+AC_ERLANG_NEED_ERLC
+AC_ERLANG_CHECK_LIB([stdlib],
+ [AC_MSG_RESULT([ok])],
+ [AC_MSG_RESULT([failed])])
+AC_CONFIG_FILES([dir])
+AC_OUTPUT
+]])
+
+AT_DATA([dir.in],
address@hidden@
+]])
+
+AT_CHECK_AUTOCONF
+AT_CHECK_CONFIGURE([-q])
+
+dir=`cat dir`
+rm -f dir
+AT_CHECK([test "$dir" = "not found" || test -d "$dir"])
+
+AT_CLEANUP
+
+
+## --------------------------- ##
+## Erlang root dir detection. ##
+## --------------------------- ##
+
+AT_SETUP_ERLANG([AC_ERLANG_SUBST_ROOT_DIR])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_ERLANG_NEED_ERL
+AC_ERLANG_NEED_ERLC
+AC_ERLANG_SUBST_ROOT_DIR
+AC_CONFIG_FILES([dir])
+AC_OUTPUT
+]])
+
+AT_DATA([dir.in],
address@hidden@
+]])
+
+AT_CHECK_AUTOCONF
+AT_CHECK_CONFIGURE([-q])
+
+dir=`cat dir`
+rm -f dir
+AT_CHECK([test -d "$dir"])
+
+AT_CLEANUP
+
+
+## -------------------------- ##
+## Erlang lib dir detection. ##
+## -------------------------- ##
+
+AT_SETUP_ERLANG([AC_ERLANG_SUBST_LIB_DIR])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_ERLANG_NEED_ERL
+AC_ERLANG_NEED_ERLC
+AC_ERLANG_SUBST_LIB_DIR
+AC_CONFIG_FILES([dir])
+AC_OUTPUT
+]])
+
+AT_DATA([dir.in],
address@hidden@
+]])
+
+AT_CHECK_AUTOCONF
+AT_CHECK_CONFIGURE([-q])
+
+dir=`cat dir`
+rm -f dir
+AT_CHECK([test -d "$dir"])
+
+AT_CLEANUP
+
+
+## ------------------------------- ##
+## Erlang installation detection. ##
+## ------------------------------- ##
+
+AT_CHECK_MACRO([AC_ERLANG_SUBST_INSTALL_LIB_DIR], [],
+[AT_KEYWORDS([Erlang])])
+
+
+## ------------------------------- ##
+## Erlang installation detection. ##
+## ------------------------------- ##
+
+AT_SETUP([AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR])
+AT_KEYWORDS([Erlang])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR([test_blah], [1.24-b])
+AC_CONFIG_FILES([dir])
+AC_OUTPUT
+]])
+
+AT_DATA([dir.in],
address@hidden@
+]])
+
+AT_CHECK_AUTOCONF
+AT_CHECK_CONFIGURE([-q])
+
+dir=`cat dir`
+subdir=`AS_BASENAME([$dir])`
+rm -f dir
+AT_CHECK([test "$subdir" = "test_blah-1.24-b"])
+
+AT_CLEANUP
+
+
+## -------------------------- ##
+## Erlang version detection. ##
+## -------------------------- ##
+
+AT_SETUP_ERLANG([AC_ERLANG_SUBST_ERTS_VER])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_ERLANG_NEED_ERL
+AC_ERLANG_NEED_ERLC
+AC_ERLANG_SUBST_ERTS_VER
+]])
+
+AT_CHECK_AUTOCONF
+AT_CHECK_CONFIGURE([-q])
+
+AT_CLEANUP
diff --git a/tests/suite.at b/tests/suite.at
index ff0347e..7302b60 100644
--- a/tests/suite.at
+++ b/tests/suite.at
@@ -52,6 +52,7 @@ m4_include([c.at])
m4_include([acc.at])
m4_include([fortran.at])
m4_include([acfortran.at])
+m4_include([erlang.at])
# Checking that AC_CHECK_FOO macros work properly.
m4_include([semantics.at])
hooks/post-receive
--
GNU Autoconf source repository
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Autoconf source repository branch, master, updated. v2.63b-89-g0f48062,
Eric Blake <=