summaryrefslogtreecommitdiffstats
path: root/ext/lsm1/test/lsm1_common.tcl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:07:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:07:11 +0000
commit63847496f14c813a5d80efd5b7de0f1294ffe1e3 (patch)
tree01c7571c7c762ceee70638549a99834fdd7c411b /ext/lsm1/test/lsm1_common.tcl
parentInitial commit. (diff)
downloadsqlite3-63847496f14c813a5d80efd5b7de0f1294ffe1e3.tar.xz
sqlite3-63847496f14c813a5d80efd5b7de0f1294ffe1e3.zip
Adding upstream version 3.45.1.upstream/3.45.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ext/lsm1/test/lsm1_common.tcl')
-rw-r--r--ext/lsm1/test/lsm1_common.tcl38
1 files changed, 38 insertions, 0 deletions
diff --git a/ext/lsm1/test/lsm1_common.tcl b/ext/lsm1/test/lsm1_common.tcl
new file mode 100644
index 0000000..0e6cd84
--- /dev/null
+++ b/ext/lsm1/test/lsm1_common.tcl
@@ -0,0 +1,38 @@
+# 2014 Dec 19
+#
+# The author disclaims copyright to this source code. In place of
+# a legal notice, here is a blessing:
+#
+# May you do good and not evil.
+# May you find forgiveness for yourself and forgive others.
+# May you share freely, never taking more than you give.
+#
+#***********************************************************************
+#
+
+if {![info exists testdir]} {
+ set testdir [file join [file dirname [info script]] .. .. .. test]
+}
+source $testdir/tester.tcl
+
+# Check if the lsm1 extension has been compiled.
+if {$::tcl_platform(platform) == "windows"} {
+ set lsm1 lsm.dll
+} else {
+ set lsm1 lsm.so
+}
+
+if {[file exists [file join .. $lsm1]]} {
+ proc return_if_no_lsm1 {} {}
+} else {
+ proc return_if_no_lsm1 {} {
+ finish_test
+ return -code return
+ }
+ return
+}
+
+proc load_lsm1_vtab {db} {
+ db enable_load_extension 1
+ db eval {SELECT load_extension('../lsm')}
+}