2022-07-01 23:02:14 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
2023-08-11 17:06:28 +00:00
|
|
|
export TZ=UTC
|
2022-07-01 23:02:14 +00:00
|
|
|
export YES_COLOR=1
|
|
|
|
|
2022-07-07 17:46:06 +00:00
|
|
|
# XXX sqlite reports different results for the "detail" column, so we
|
|
|
|
# have to rewrite it.
|
2022-07-01 23:02:14 +00:00
|
|
|
run_cap_test ${lnav_test} -n \
|
2022-07-07 17:46:06 +00:00
|
|
|
-c ";EXPLAIN QUERY PLAN SELECT * FROM access_log WHERE log_path GLOB '*/logfile_access_log.*'" \
|
|
|
|
-c ";SELECT \$id, \$parent, \$notused, replace(\$detail, 'SCAN TABLE', 'SCAN')" \
|
|
|
|
${test_dir}/logfile_access_log.*
|
2022-07-01 23:02:14 +00:00
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2022-07-07 17:46:06 +00:00
|
|
|
-c ";SELECT *,log_unique_path FROM access_log WHERE log_path GLOB '*/logfile_access_log.*'" \
|
|
|
|
${test_dir}/logfile_access_log.*
|
2022-07-12 06:17:42 +00:00
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -n \
|
|
|
|
-c ";EXPLAIN QUERY PLAN SELECT * FROM all_logs WHERE log_format = 'access_log'" \
|
|
|
|
-c ";SELECT \$id, \$parent, \$notused, replace(\$detail, 'SCAN TABLE', 'SCAN')" \
|
|
|
|
${test_dir}/logfile_access_log.*
|
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -n \
|
|
|
|
-c ";SELECT *,log_format FROM all_logs WHERE log_format = 'access_log'" \
|
|
|
|
${test_dir}/logfile_access_log.* \
|
2022-07-12 15:47:19 +00:00
|
|
|
${test_dir}/logfile_procstate.0
|
2022-07-12 06:17:42 +00:00
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -n \
|
|
|
|
-c ";EXPLAIN QUERY PLAN SELECT * FROM all_logs WHERE log_level < 'error'" \
|
|
|
|
-c ";SELECT \$id, \$parent, \$notused, replace(\$detail, 'SCAN TABLE', 'SCAN')" \
|
|
|
|
${test_dir}/logfile_access_log.*
|
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -n \
|
|
|
|
-c ";SELECT * FROM all_logs WHERE log_level < 'error'" \
|
|
|
|
${test_dir}/logfile_access_log.*
|
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -n \
|
|
|
|
-c ";SELECT * FROM all_logs WHERE log_level <= 'error'" \
|
|
|
|
${test_dir}/logfile_access_log.*
|
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -n \
|
|
|
|
-c ";SELECT * FROM all_logs WHERE log_level >= 'error'" \
|
|
|
|
${test_dir}/logfile_access_log.*
|
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -n \
|
|
|
|
-c ";SELECT * FROM all_logs WHERE log_level > 'error'" \
|
|
|
|
${test_dir}/logfile_access_log.*
|
2023-10-09 15:55:20 +00:00
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -n \
|
|
|
|
-c ";SELECT * FROM all_logs WHERE log_line <= 20" \
|
|
|
|
${test_dir}/logfile_access_log.*
|