summaryrefslogtreecommitdiffstats
path: root/tests/ts/liblastlog2
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ts/liblastlog2')
-rwxr-xr-xtests/ts/liblastlog2/dlopen23
-rwxr-xr-xtests/ts/liblastlog2/pam_lastlog2_output17
-rwxr-xr-xtests/ts/liblastlog2/remove_entry15
-rwxr-xr-xtests/ts/liblastlog2/rename_user15
-rwxr-xr-xtests/ts/liblastlog2/sqlite3_time15
-rwxr-xr-xtests/ts/liblastlog2/write_read_user15
-rwxr-xr-xtests/ts/liblastlog2/y2038_ll2_read_all15
7 files changed, 115 insertions, 0 deletions
diff --git a/tests/ts/liblastlog2/dlopen b/tests/ts/liblastlog2/dlopen
new file mode 100755
index 0000000..8ce4e17
--- /dev/null
+++ b/tests/ts/liblastlog2/dlopen
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="dlopen"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+# incorrect warning: top_builddir is referenced but not assigned.
+# shellcheck disable=SC2154
+if [ -e "$top_builddir/meson.conf" ]; then
+ #meson build
+ libpath=${top_builddir}/liblastlog2
+else
+ #automake/autoconf build
+ libpath=${top_builddir}/.libs
+fi
+
+ts_check_test_command $TS_HELPER_LIBLASTLOG2_DLOPEN
+
+$TS_HELPER_LIBLASTLOG2_DLOPEN ${libpath}/liblastlog2.so >/dev/null || ts_failed "returned an error"
+
+ts_finalize
diff --git a/tests/ts/liblastlog2/pam_lastlog2_output b/tests/ts/liblastlog2/pam_lastlog2_output
new file mode 100755
index 0000000..c9961f1
--- /dev/null
+++ b/tests/ts/liblastlog2/pam_lastlog2_output
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="pam_lastlog2_output"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command $TS_HELPER_LIBLASTLOG2_PAM_LASTLOG2_OUTPUT
+
+export TZ=UTC
+
+$TS_HELPER_LIBLASTLOG2_PAM_LASTLOG2_OUTPUT || ts_failed "returned an error"
+
+rm pam_lastlog2-output.db
+
+ts_finalize
diff --git a/tests/ts/liblastlog2/remove_entry b/tests/ts/liblastlog2/remove_entry
new file mode 100755
index 0000000..63503d9
--- /dev/null
+++ b/tests/ts/liblastlog2/remove_entry
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="remove_entry"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command $TS_HELPER_LIBLASTLOG2_REMOVE_ENTRY
+
+$TS_HELPER_LIBLASTLOG2_REMOVE_ENTRY || ts_failed "returned an error"
+
+rm tst-delete-user.db
+
+ts_finalize
diff --git a/tests/ts/liblastlog2/rename_user b/tests/ts/liblastlog2/rename_user
new file mode 100755
index 0000000..38f0763
--- /dev/null
+++ b/tests/ts/liblastlog2/rename_user
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="rename_user"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command $TS_HELPER_LIBLASTLOG2_RENAME_USER
+
+$TS_HELPER_LIBLASTLOG2_RENAME_USER || ts_failed "returned an error"
+
+rm tst-rename-user.db
+
+ts_finalize
diff --git a/tests/ts/liblastlog2/sqlite3_time b/tests/ts/liblastlog2/sqlite3_time
new file mode 100755
index 0000000..9ff27fe
--- /dev/null
+++ b/tests/ts/liblastlog2/sqlite3_time
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="sqlite3_time"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command $TS_HELPER_LIBLASTLOG2_Y2038_SQLITE2_TIME
+
+$TS_HELPER_LIBLASTLOG2_Y2038_SQLITE2_TIME >/dev/null || ts_failed "returned an error"
+
+rm y2038-sqlite3-time.db
+
+ts_finalize
diff --git a/tests/ts/liblastlog2/write_read_user b/tests/ts/liblastlog2/write_read_user
new file mode 100755
index 0000000..8a6028a
--- /dev/null
+++ b/tests/ts/liblastlog2/write_read_user
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="write_read_user"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command $TS_HELPER_LIBLASTLOG2_WRITE_READ_USER
+
+$TS_HELPER_LIBLASTLOG2_WRITE_READ_USER || ts_failed "returned an error"
+
+rm tst-write-read-user.db
+
+ts_finalize
diff --git a/tests/ts/liblastlog2/y2038_ll2_read_all b/tests/ts/liblastlog2/y2038_ll2_read_all
new file mode 100755
index 0000000..da779c2
--- /dev/null
+++ b/tests/ts/liblastlog2/y2038_ll2_read_all
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="y2038_ll2_read_all"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command $TS_HELPER_LIBLASTLOG2_Y2038_LL2_READ_ALL
+
+$TS_HELPER_LIBLASTLOG2_Y2038_LL2_READ_ALL >/dev/null || ts_failed "returned an error"
+
+rm y2038-ll2_read_all.db
+
+ts_finalize