mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix 'make distcheck' problems with new unittest code, and a small
portability problem. BitKeeper/etc/ignore: Use a wildcard to ignore all unittest *.t files unittest/Makefile.am: Add unit to DISTCLEANFILES, and make sure to copy it from srcdir unittest/examples/Makefile.am: Use srcdir to find mytap header unittest/mysys/Makefile.am: Use srcdir to find mytap header unittest/mytap/t/Makefile.am: Use builddir for finding mytap library unittest/mytap/tap.c: Fix portability problem (declarations after code in C code)
This commit is contained in:
@ -1760,3 +1760,7 @@ zlib/*.ds?
|
|||||||
zlib/*.vcproj
|
zlib/*.vcproj
|
||||||
mysql-test/r/*.log
|
mysql-test/r/*.log
|
||||||
client/mysql_upgrade
|
client/mysql_upgrade
|
||||||
|
unittest/examples/*.t
|
||||||
|
unittest/mysys/*.t
|
||||||
|
unittest/mytap/t/*.t
|
||||||
|
unittest/unit
|
||||||
|
@ -2,6 +2,8 @@ SUBDIRS = mytap . mysys examples
|
|||||||
|
|
||||||
noinst_SCRIPTS = unit
|
noinst_SCRIPTS = unit
|
||||||
|
|
||||||
|
DISTCLEANFILES = unit
|
||||||
|
|
||||||
unittests = mysys examples
|
unittests = mysys examples
|
||||||
|
|
||||||
.PHONY: all mytap mysys examples test
|
.PHONY: all mytap mysys examples test
|
||||||
@ -18,6 +20,6 @@ mysys:
|
|||||||
examples:
|
examples:
|
||||||
cd examples && $(MAKE)
|
cd examples && $(MAKE)
|
||||||
|
|
||||||
unit: unit.pl
|
unit: $(srcdir)/unit.pl
|
||||||
cp $< $@
|
cp $< $@
|
||||||
chmod +x $@
|
chmod +x $@
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
AM_CPPFLAGS = -I$(srcdir) -I$(top_builddir)/include
|
AM_CPPFLAGS = -I$(srcdir) -I$(top_builddir)/include
|
||||||
AM_CPPFLAGS += -I$(top_builddir)/unittest/mytap
|
AM_CPPFLAGS += -I$(top_srcdir)/unittest/mytap
|
||||||
|
|
||||||
AM_LDFLAGS = -L$(top_builddir)/unittest/mytap
|
AM_LDFLAGS = -L$(top_builddir)/unittest/mytap
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
AM_CPPFLAGS = @ZLIB_INCLUDES@ -I$(top_builddir)/include
|
AM_CPPFLAGS = @ZLIB_INCLUDES@ -I$(top_builddir)/include
|
||||||
AM_CPPFLAGS += -I$(top_srcdir)/include -I$(top_builddir)/unittest/mytap
|
AM_CPPFLAGS += -I$(top_srcdir)/include -I$(top_srcdir)/unittest/mytap
|
||||||
|
|
||||||
AM_LDFLAGS = -L$(top_builddir)/unittest/mytap -L$(top_builddir)/mysys
|
AM_LDFLAGS = -L$(top_builddir)/unittest/mytap -L$(top_builddir)/mysys
|
||||||
AM_LDFLAGS += -L$(top_builddir)/strings -L$(top_builddir)/dbug
|
AM_LDFLAGS += -L$(top_builddir)/strings -L$(top_builddir)/dbug
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
AM_CPPFLAGS = -I$(srcdir) -I$(top_builddir)/include
|
AM_CPPFLAGS = -I$(srcdir) -I$(top_builddir)/include
|
||||||
AM_CPPFLAGS += -I$(srcdir)/..
|
AM_CPPFLAGS += -I$(srcdir)/..
|
||||||
|
|
||||||
AM_LDFLAGS = -L$(srcdir)/..
|
AM_LDFLAGS = -L$(top_builddir)/unittest/mytap
|
||||||
|
|
||||||
AM_CFLAGS = -Wall -ansi -pedantic
|
AM_CFLAGS = -Wall -ansi -pedantic
|
||||||
|
|
||||||
|
@ -138,11 +138,12 @@ skip_all(char const *reason, ...)
|
|||||||
void
|
void
|
||||||
ok(int const pass, char const *fmt, ...)
|
ok(int const pass, char const *fmt, ...)
|
||||||
{
|
{
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, fmt);
|
||||||
|
|
||||||
if (!pass && *g_test.todo == '\0')
|
if (!pass && *g_test.todo == '\0')
|
||||||
++g_test.failed;
|
++g_test.failed;
|
||||||
|
|
||||||
va_list ap;
|
|
||||||
va_start(ap, fmt);
|
|
||||||
emit_tap(pass, fmt, ap);
|
emit_tap(pass, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
if (*g_test.todo != '\0')
|
if (*g_test.todo != '\0')
|
||||||
|
Reference in New Issue
Block a user