From cf17313d62dcf1c10df0fe19287e354ede68206b Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sat, 26 Apr 2014 22:42:47 +0200 Subject: [PATCH] Moved unit tests into t/unit/ subdirectory. --- .gitignore | 8 ++-- t/Makefile.am | 50 ++++++++++++------------- t/{ => unit}/core/data_test.c | 2 +- t/{ => unit}/core/object_test.c | 2 +- t/{ => unit}/core/store_lookup_test.c | 2 +- t/{ => unit}/core/store_test.c | 2 +- t/{ => unit}/core/time_test.c | 2 +- t/{ => unit}/frontend/connection_test.c | 2 +- t/{ => unit}/frontend/parser_test.c | 2 +- t/{ => unit}/frontend/sock_test.c | 2 +- t/{ => unit}/libsysdb_net_test.c | 2 +- t/{ => unit}/libsysdb_test.c | 2 +- t/{ => unit}/libsysdb_test.h | 2 +- t/{ => unit}/libsysdb_testutils.c | 2 +- t/{ => unit}/libsysdb_testutils.h | 2 +- t/{ => unit}/utils/channel_test.c | 2 +- t/{ => unit}/utils/dbi_test.c | 2 +- t/{ => unit}/utils/llist_test.c | 2 +- t/{ => unit}/utils/strbuf_test.c | 2 +- t/{ => unit}/utils/unixsock_test.c | 2 +- 20 files changed, 47 insertions(+), 47 deletions(-) rename t/{ => unit}/core/data_test.c (99%) rename t/{ => unit}/core/object_test.c (99%) rename t/{ => unit}/core/store_lookup_test.c (99%) rename t/{ => unit}/core/store_test.c (99%) rename t/{ => unit}/core/time_test.c (98%) rename t/{ => unit}/frontend/connection_test.c (99%) rename t/{ => unit}/frontend/parser_test.c (99%) rename t/{ => unit}/frontend/sock_test.c (99%) rename t/{ => unit}/libsysdb_net_test.c (98%) rename t/{ => unit}/libsysdb_test.c (98%) rename t/{ => unit}/libsysdb_test.h (98%) rename t/{ => unit}/libsysdb_testutils.c (98%) rename t/{ => unit}/libsysdb_testutils.h (97%) rename t/{ => unit}/utils/channel_test.c (99%) rename t/{ => unit}/utils/dbi_test.c (99%) rename t/{ => unit}/utils/llist_test.c (99%) rename t/{ => unit}/utils/strbuf_test.c (99%) rename t/{ => unit}/utils/unixsock_test.c (99%) diff --git a/.gitignore b/.gitignore index 9f1fd8f..0657cd0 100644 --- a/.gitignore +++ b/.gitignore @@ -49,8 +49,8 @@ src/sysdbd sysdb.h # unit testing output -t/libsysdb_test -t/libsysdb_net_test -t/*.log -t/*.trs +t/unit/libsysdb_test +t/unit/libsysdb_net_test +t/unit/*.log +t/unit/*.trs test-driver diff --git a/t/Makefile.am b/t/Makefile.am index 551d863..4764a6e 100644 --- a/t/Makefile.am +++ b/t/Makefile.am @@ -5,35 +5,35 @@ AM_CFLAGS = @STRICT_CFLAGS@ @COVERAGE_CFLAGS@ AM_LDFLAGS = @COVERAGE_LDFLAGS@ AM_CPPFLAGS = -I$(top_srcdir)/src/include -TESTS = libsysdb_test libsysdb_net_test -check_PROGRAMS = libsysdb_test libsysdb_net_test +TESTS = unit/libsysdb_test unit/libsysdb_net_test +check_PROGRAMS = unit/libsysdb_test unit/libsysdb_net_test -libsysdb_test_SOURCES = \ - libsysdb_test.c libsysdb_test.h \ - libsysdb_testutils.c libsysdb_testutils.h \ - core/data_test.c \ - core/object_test.c \ - core/store_test.c \ - core/store_lookup_test.c \ - core/time_test.c \ - frontend/connection_test.c \ - frontend/parser_test.c \ - frontend/sock_test.c \ - utils/channel_test.c \ - utils/dbi_test.c \ - utils/llist_test.c \ - utils/strbuf_test.c -libsysdb_test_CFLAGS = $(AM_CFLAGS) @CHECK_CFLAGS@ -libsysdb_test_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@ +unit_libsysdb_test_SOURCES = \ + unit/libsysdb_test.c unit/libsysdb_test.h \ + unit/libsysdb_testutils.c unit/libsysdb_testutils.h \ + unit/core/data_test.c \ + unit/core/object_test.c \ + unit/core/store_test.c \ + unit/core/store_lookup_test.c \ + unit/core/time_test.c \ + unit/frontend/connection_test.c \ + unit/frontend/parser_test.c \ + unit/frontend/sock_test.c \ + unit/utils/channel_test.c \ + unit/utils/dbi_test.c \ + unit/utils/llist_test.c \ + unit/utils/strbuf_test.c +unit_libsysdb_test_CFLAGS = $(AM_CFLAGS) @CHECK_CFLAGS@ -I$(top_srcdir)/t/unit +unit_libsysdb_test_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@ -libsysdb_net_test_SOURCES = \ - libsysdb_net_test.c libsysdb_test.h \ - libsysdb_testutils.c libsysdb_testutils.h +unit_libsysdb_net_test_SOURCES = \ + unit/libsysdb_net_test.c unit/libsysdb_test.h \ + unit/libsysdb_testutils.c unit/libsysdb_testutils.h if BUILD_WITH_FOPENCOOKIE -libsysdb_net_test_SOURCES += utils/unixsock_test.c +unit_libsysdb_net_test_SOURCES += unit/utils/unixsock_test.c endif -libsysdb_net_test_CFLAGS = $(AM_CFLAGS) @CHECK_CFLAGS@ -libsysdb_net_test_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@ +unit_libsysdb_net_test_CFLAGS = $(AM_CFLAGS) @CHECK_CFLAGS@ -I$(top_srcdir)/t/unit +unit_libsysdb_net_test_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@ test: check diff --git a/t/core/data_test.c b/t/unit/core/data_test.c similarity index 99% rename from t/core/data_test.c rename to t/unit/core/data_test.c index 261d5fd..432bd75 100644 --- a/t/core/data_test.c +++ b/t/unit/core/data_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/core/data_test.c + * SysDB - t/unit/core/data_test.c * Copyright (C) 2014 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/core/object_test.c b/t/unit/core/object_test.c similarity index 99% rename from t/core/object_test.c rename to t/unit/core/object_test.c index 85e95c3..dec6d41 100644 --- a/t/core/object_test.c +++ b/t/unit/core/object_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/core/object_test.c + * SysDB - t/unit/core/object_test.c * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/core/store_lookup_test.c b/t/unit/core/store_lookup_test.c similarity index 99% rename from t/core/store_lookup_test.c rename to t/unit/core/store_lookup_test.c index 8ead947..5631519 100644 --- a/t/core/store_lookup_test.c +++ b/t/unit/core/store_lookup_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/core/store_lookup_test.c + * SysDB - t/unit/core/store_lookup_test.c * Copyright (C) 2014 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/core/store_test.c b/t/unit/core/store_test.c similarity index 99% rename from t/core/store_test.c rename to t/unit/core/store_test.c index 29c5b1b..07651ee 100644 --- a/t/core/store_test.c +++ b/t/unit/core/store_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/core/store_test.c + * SysDB - t/unit/core/store_test.c * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/core/time_test.c b/t/unit/core/time_test.c similarity index 98% rename from t/core/time_test.c rename to t/unit/core/time_test.c index f22e236..2bffbbd 100644 --- a/t/core/time_test.c +++ b/t/unit/core/time_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/core/time_test.c + * SysDB - t/unit/core/time_test.c * Copyright (C) 2014 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/frontend/connection_test.c b/t/unit/frontend/connection_test.c similarity index 99% rename from t/frontend/connection_test.c rename to t/unit/frontend/connection_test.c index 9851a86..125bb56 100644 --- a/t/frontend/connection_test.c +++ b/t/unit/frontend/connection_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/frontend/connection_test.c + * SysDB - t/unit/frontend/connection_test.c * Copyright (C) 2014 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/frontend/parser_test.c b/t/unit/frontend/parser_test.c similarity index 99% rename from t/frontend/parser_test.c rename to t/unit/frontend/parser_test.c index f64b9eb..cb3a2ad 100644 --- a/t/frontend/parser_test.c +++ b/t/unit/frontend/parser_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/frontend/parser_test.c + * SysDB - t/unit/frontend/parser_test.c * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/frontend/sock_test.c b/t/unit/frontend/sock_test.c similarity index 99% rename from t/frontend/sock_test.c rename to t/unit/frontend/sock_test.c index 55f1a0c..852a498 100644 --- a/t/frontend/sock_test.c +++ b/t/unit/frontend/sock_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/frontend/sock_test.c + * SysDB - t/unit/frontend/sock_test.c * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/libsysdb_net_test.c b/t/unit/libsysdb_net_test.c similarity index 98% rename from t/libsysdb_net_test.c rename to t/unit/libsysdb_net_test.c index 85ec83c..ae213c0 100644 --- a/t/libsysdb_net_test.c +++ b/t/unit/libsysdb_net_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/libsysdb_net_test.c + * SysDB - t/unit/libsysdb_net_test.c * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/libsysdb_test.c b/t/unit/libsysdb_test.c similarity index 98% rename from t/libsysdb_test.c rename to t/unit/libsysdb_test.c index 96bb907..7d833d5 100644 --- a/t/libsysdb_test.c +++ b/t/unit/libsysdb_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/libsysdb_test.c + * SysDB - t/unit/libsysdb_test.c * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/libsysdb_test.h b/t/unit/libsysdb_test.h similarity index 98% rename from t/libsysdb_test.h rename to t/unit/libsysdb_test.h index 8d98479..df5b904 100644 --- a/t/libsysdb_test.h +++ b/t/unit/libsysdb_test.h @@ -1,5 +1,5 @@ /* - * SysDB - t/libsysdb_test.h + * SysDB - t/unit/libsysdb_test.h * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/libsysdb_testutils.c b/t/unit/libsysdb_testutils.c similarity index 98% rename from t/libsysdb_testutils.c rename to t/unit/libsysdb_testutils.c index 964afdb..6f6692d 100644 --- a/t/libsysdb_testutils.c +++ b/t/unit/libsysdb_testutils.c @@ -1,5 +1,5 @@ /* - * SysDB - t/libsysdb_testutils.c + * SysDB - t/unit/libsysdb_testutils.c * Copyright (C) 2014 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/libsysdb_testutils.h b/t/unit/libsysdb_testutils.h similarity index 97% rename from t/libsysdb_testutils.h rename to t/unit/libsysdb_testutils.h index 3f828a9..63ef460 100644 --- a/t/libsysdb_testutils.h +++ b/t/unit/libsysdb_testutils.h @@ -1,5 +1,5 @@ /* - * SysDB - t/libsysdb_testutils.h + * SysDB - t/unit/libsysdb_testutils.h * Copyright (C) 2014 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/utils/channel_test.c b/t/unit/utils/channel_test.c similarity index 99% rename from t/utils/channel_test.c rename to t/unit/utils/channel_test.c index 3827c07..0354397 100644 --- a/t/utils/channel_test.c +++ b/t/unit/utils/channel_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/utils/channel_test.c + * SysDB - t/unit/utils/channel_test.c * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/utils/dbi_test.c b/t/unit/utils/dbi_test.c similarity index 99% rename from t/utils/dbi_test.c rename to t/unit/utils/dbi_test.c index 9d45feb..b8a5ea9 100644 --- a/t/utils/dbi_test.c +++ b/t/unit/utils/dbi_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/utils/dbi_test.c + * SysDB - t/unit/utils/dbi_test.c * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/utils/llist_test.c b/t/unit/utils/llist_test.c similarity index 99% rename from t/utils/llist_test.c rename to t/unit/utils/llist_test.c index cc9954d..5ae771f 100644 --- a/t/utils/llist_test.c +++ b/t/unit/utils/llist_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/utils/llist_test.c + * SysDB - t/unit/utils/llist_test.c * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/utils/strbuf_test.c b/t/unit/utils/strbuf_test.c similarity index 99% rename from t/utils/strbuf_test.c rename to t/unit/utils/strbuf_test.c index bb03296..f9c3e93 100644 --- a/t/utils/strbuf_test.c +++ b/t/unit/utils/strbuf_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/utils/strbuf_test.c + * SysDB - t/unit/utils/strbuf_test.c * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/t/utils/unixsock_test.c b/t/unit/utils/unixsock_test.c similarity index 99% rename from t/utils/unixsock_test.c rename to t/unit/utils/unixsock_test.c index 4502767..c28781e 100644 --- a/t/utils/unixsock_test.c +++ b/t/unit/utils/unixsock_test.c @@ -1,5 +1,5 @@ /* - * SysDB - t/utils/unixsock_test.c + * SysDB - t/unit/utils/unixsock_test.c * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * -- 2.30.2