Merge pull request #225 from sureshsundriyal/wip

[build] Get rid of the sqlite3 dependency.
pull/226/head
Suresh Sundriyal 10 years ago
commit 520ec12bab

@ -65,12 +65,6 @@ AC_PROG_RANLIB
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PATH_PROG(SQLITE3_CMD, [sqlite3])
if test x"$SQLITE3_CMD" = x""; then
AC_MSG_ERROR([The sqlite3 command is required])
fi
AC_PATH_PROG(BZIP2_CMD, [bzip2])
AC_CHECK_SIZEOF(off_t)

@ -2,18 +2,10 @@
TESTS_ENVIRONMENT = $(SHELL) $(top_builddir)/TESTS_ENVIRONMENT
LOG_COMPILER = $(SHELL) $(top_builddir)/TESTS_ENVIRONMENT
DBGEN_V = $(DBGEN_V_@AM_V@)
DBGEN_V_ = $(DBGEN_V_@AM_DEFAULT_V@)
DBGEN_V_0 = @echo " DBGEN " $@;
RM_V = $(RM_V_@AM_V@)
RM_V_ = $(RM_V_@AM_DEFAULT_V@)
RM_V_0 = @echo " RM " $@;
simple-db.db: simple-db.sql
$(RM_V)rm -f $@
$(DBGEN_V)$(SQLITE3_CMD) $@ < $(srcdir)/simple-db.sql
AM_CPPFLAGS = \
-Wall \
-I$(top_srcdir)/src \
@ -245,7 +237,6 @@ dist_noinst_DATA = \
logfile_with_a_really_long_name_to_test_a_bug_with_long_names.0 \
multiline.lnav \
mvwattrline_output.0 \
simple-db.sql \
view_colors_output.0 \
vt52_curses_input.0 \
vt52_curses_input.1 \
@ -258,9 +249,6 @@ dist_noinst_DATA = \
log-samples/sample-70c906b3c1a1cf03f15bde92ee78edfa6f9b7960.txt \
log-samples/sample-ad31f12d2adabd07e3ddda3ad5b0dbf6b49c4c99.txt
nodist_noinst_DATA = \
simple-db.db
TESTS = \
test_ansi_scrubber \
test_auto_fd \

@ -1,12 +0,0 @@
CREATE TABLE IF NOT EXISTS person (
id integer PRIMARY KEY,
first_name text,
last_name text,
age integer
);
INSERT INTO person (id, first_name, last_name, age)
VALUES (0, "Phil", "Myman", 30);
INSERT INTO person (id, first_name, last_name, age)
VALUES (1, "Lem", "Hewitt", 35);

@ -411,6 +411,18 @@ log_line log_part log_time log_idle_msecs log_level log_mark log_
3 p.0 2015-11-03 09:47:02.000 1404000 info 0 veridian <NULL> sudo
EOF
# Create a dummy database for the next couple of tests to consume.
run_test ${lnav_test} -n \
-c ";ATTACH DATABASE 'simple-db.db' as 'db'" \
-c ";CREATE TABLE IF NOT EXISTS db.person ( id integer PRIMARY KEY, first_name text, last_name, age integer )" \
-c ";INSERT INTO db.person(id, first_name, last_name, age) VALUES (0, 'Phil', 'Myman', 30)" \
-c ";INSERT INTO db.person(id, first_name, last_name, age) VALUES (1, 'Lem', 'Hewitt', 35)" \
-c ";DETACH DATABASE 'db'" \
/dev/null
check_output "Could not create db?" <<EOF
EOF
# Test to see if lnav can recognize a sqlite3 db file passed in as an argument.
run_test ${lnav_test} -n -c ";select * from person order by age asc" \
simple-db.db
@ -426,7 +438,7 @@ EOF
# and we might not have sufficient privileges on the system the tests are being
# run on.
run_test ${lnav_test} -n \
-c ";attach 'simple-db.db' as 'db'" \
-c ";attach database 'simple-db.db' as 'db'" \
-c ';select * from person order by age asc' \
/dev/null

Loading…
Cancel
Save