diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-10-09 17:28:53 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2017-10-11 22:32:19 +0200 |
commit | 985094601315c45c2e0a2ac8292df4c2f646c698 (patch) | |
tree | 655555307d015cc7590789ac79969a902450a00a /tests/db/Makefile.am | |
parent | f7c3e6e3a29f67398fdb8790629d0e951a494bc1 (diff) |
add initial db_test: creating and deleting subscribers
Change-Id: I2a0d277f55162bf5ceb0fc7d50390f2994daed71
Diffstat (limited to 'tests/db/Makefile.am')
-rw-r--r-- | tests/db/Makefile.am | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/db/Makefile.am b/tests/db/Makefile.am new file mode 100644 index 0000000..a1f35a7 --- /dev/null +++ b/tests/db/Makefile.am @@ -0,0 +1,53 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/src \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + -ggdb3 \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ + $(SQLITE3_CFLAGS) \ + $(NULL) + +AM_LDFLAGS = \ + $(NULL) + +EXTRA_DIST = \ + db_test.ok \ + db_test.err \ + $(NULL) + +check_PROGRAMS = db_test + +db_test_SOURCES = \ + db_test.c \ + $(NULL) + +db_test_LDADD = \ + $(top_srcdir)/src/db.c \ + $(top_srcdir)/src/db_hlr.c \ + $(top_srcdir)/src/db_auc.c \ + $(top_srcdir)/src/logging.c \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(SQLITE3_LIBS) \ + $(NULL) + +.PHONY: db_test.db update_exp manual manual-nonverbose manual-gdb +db_test.db: + rm -f db_test.db + sqlite3 $(builddir)/db_test.db < $(top_srcdir)/sql/hlr.sql + +update_exp: db_test.db + cd $(builddir); ./db_test >"$(srcdir)/db_test.ok" 2>"$(srcdir)/db_test.err" + +manual: db_test.db + cd $(builddir); ./db_test -v + +manual-nonverbose: db_test.db + cd $(builddir); ./db_test + +manual-gdb: db_test.db + cd $(builddir); gdb -ex run --args ./db_test -v |