From f77b044303c2047123de68c3dc95178ac2e8f11d Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Thu, 8 Dec 2022 22:11:49 -0800 Subject: [PATCH] Simplified tests --- Makefile | 2 +- test/expected/btree.out | 2 -- test/expected/cast.out | 2 -- test/expected/copy.out | 2 -- test/expected/functions.out | 2 -- test/expected/input.out | 2 -- test/expected/ivfflat_cosine.out | 2 -- test/expected/ivfflat_ip.out | 2 -- test/expected/ivfflat_l2.out | 2 -- test/expected/ivfflat_options.out | 2 -- test/expected/ivfflat_unlogged.out | 2 -- test/sql/btree.sql | 2 -- test/sql/cast.sql | 3 --- test/sql/copy.sql | 3 --- test/sql/functions.sql | 3 --- test/sql/input.sql | 3 --- test/sql/ivfflat_cosine.sql | 2 -- test/sql/ivfflat_ip.sql | 2 -- test/sql/ivfflat_l2.sql | 2 -- test/sql/ivfflat_options.sql | 2 -- test/sql/ivfflat_unlogged.sql | 2 -- 21 files changed, 1 insertion(+), 45 deletions(-) diff --git a/Makefile b/Makefile index 8919d06..b6a4f91 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ OBJS = src/ivfbuild.o src/ivfflat.o src/ivfinsert.o src/ivfkmeans.o src/ivfscan. TESTS = $(wildcard test/sql/*.sql) REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS)) -REGRESS_OPTS = --inputdir=test +REGRESS_OPTS = --inputdir=test --load-extension=vector OPTFLAGS = -march=native diff --git a/test/expected/btree.out b/test/expected/btree.out index 4a215ce..d8b6da5 100644 --- a/test/expected/btree.out +++ b/test/expected/btree.out @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SET enable_seqscan = off; CREATE TABLE t (val vector(3)); INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]'), (NULL); diff --git a/test/expected/cast.out b/test/expected/cast.out index fe0b721..620d717 100644 --- a/test/expected/cast.out +++ b/test/expected/cast.out @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SELECT ARRAY[1,2,3]::vector; array --------- diff --git a/test/expected/copy.out b/test/expected/copy.out index 8a631a9..36d4620 100644 --- a/test/expected/copy.out +++ b/test/expected/copy.out @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; CREATE TABLE t (val vector(3)); INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]'), (NULL); CREATE TABLE t2 (val vector(3)); diff --git a/test/expected/functions.out b/test/expected/functions.out index 930a60e..a568e32 100644 --- a/test/expected/functions.out +++ b/test/expected/functions.out @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SELECT '[1,2,3]'::vector + '[4,5,6]'; ?column? ---------- diff --git a/test/expected/input.out b/test/expected/input.out index 8be45f8..78e0b6d 100644 --- a/test/expected/input.out +++ b/test/expected/input.out @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SELECT '[1,2,3]'::vector; vector --------- diff --git a/test/expected/ivfflat_cosine.out b/test/expected/ivfflat_cosine.out index 92662ff..96db5e0 100644 --- a/test/expected/ivfflat_cosine.out +++ b/test/expected/ivfflat_cosine.out @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SET enable_seqscan = off; CREATE TABLE t (val vector(3)); INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]'), (NULL); diff --git a/test/expected/ivfflat_ip.out b/test/expected/ivfflat_ip.out index af95308..d4fc538 100644 --- a/test/expected/ivfflat_ip.out +++ b/test/expected/ivfflat_ip.out @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SET enable_seqscan = off; CREATE TABLE t (val vector(3)); INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]'), (NULL); diff --git a/test/expected/ivfflat_l2.out b/test/expected/ivfflat_l2.out index 449ea73..2e8c6c2 100644 --- a/test/expected/ivfflat_l2.out +++ b/test/expected/ivfflat_l2.out @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SET enable_seqscan = off; CREATE TABLE t (val vector(3)); INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]'), (NULL); diff --git a/test/expected/ivfflat_options.out b/test/expected/ivfflat_options.out index b7675a1..405a75d 100644 --- a/test/expected/ivfflat_options.out +++ b/test/expected/ivfflat_options.out @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SET enable_seqscan = off; CREATE TABLE t (val vector(3)); CREATE INDEX ON t USING ivfflat (val) WITH (lists = 0); diff --git a/test/expected/ivfflat_unlogged.out b/test/expected/ivfflat_unlogged.out index 59b6e49..198ea97 100644 --- a/test/expected/ivfflat_unlogged.out +++ b/test/expected/ivfflat_unlogged.out @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SET enable_seqscan = off; CREATE UNLOGGED TABLE t (val vector(3)); INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]'), (NULL); diff --git a/test/sql/btree.sql b/test/sql/btree.sql index 32d0e4b..232b288 100644 --- a/test/sql/btree.sql +++ b/test/sql/btree.sql @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SET enable_seqscan = off; CREATE TABLE t (val vector(3)); diff --git a/test/sql/cast.sql b/test/sql/cast.sql index 8fa99dc..3227b89 100644 --- a/test/sql/cast.sql +++ b/test/sql/cast.sql @@ -1,6 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; - SELECT ARRAY[1,2,3]::vector; SELECT ARRAY[1.0,2.0,3.0]::vector; SELECT ARRAY[1,2,3]::float4[]::vector; diff --git a/test/sql/copy.sql b/test/sql/copy.sql index 5bf892f..2820090 100644 --- a/test/sql/copy.sql +++ b/test/sql/copy.sql @@ -1,6 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; - CREATE TABLE t (val vector(3)); INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]'), (NULL); diff --git a/test/sql/functions.sql b/test/sql/functions.sql index 7f397a2..2a1b631 100644 --- a/test/sql/functions.sql +++ b/test/sql/functions.sql @@ -1,6 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; - SELECT '[1,2,3]'::vector + '[4,5,6]'; SELECT '[1,2,3]'::vector - '[4,5,6]'; diff --git a/test/sql/input.sql b/test/sql/input.sql index a21038d..d21e87d 100644 --- a/test/sql/input.sql +++ b/test/sql/input.sql @@ -1,6 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; - SELECT '[1,2,3]'::vector; SELECT '[-1,2,3]'::vector; SELECT '[1.23456]'::vector; diff --git a/test/sql/ivfflat_cosine.sql b/test/sql/ivfflat_cosine.sql index cc4522a..1fec6cf 100644 --- a/test/sql/ivfflat_cosine.sql +++ b/test/sql/ivfflat_cosine.sql @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SET enable_seqscan = off; CREATE TABLE t (val vector(3)); diff --git a/test/sql/ivfflat_ip.sql b/test/sql/ivfflat_ip.sql index 342f40f..46daa4e 100644 --- a/test/sql/ivfflat_ip.sql +++ b/test/sql/ivfflat_ip.sql @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SET enable_seqscan = off; CREATE TABLE t (val vector(3)); diff --git a/test/sql/ivfflat_l2.sql b/test/sql/ivfflat_l2.sql index f4078a7..9349572 100644 --- a/test/sql/ivfflat_l2.sql +++ b/test/sql/ivfflat_l2.sql @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SET enable_seqscan = off; CREATE TABLE t (val vector(3)); diff --git a/test/sql/ivfflat_options.sql b/test/sql/ivfflat_options.sql index 1e2c1b0..d8dc45c 100644 --- a/test/sql/ivfflat_options.sql +++ b/test/sql/ivfflat_options.sql @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SET enable_seqscan = off; CREATE TABLE t (val vector(3)); diff --git a/test/sql/ivfflat_unlogged.sql b/test/sql/ivfflat_unlogged.sql index 8fa426f..ca4c6ba 100644 --- a/test/sql/ivfflat_unlogged.sql +++ b/test/sql/ivfflat_unlogged.sql @@ -1,5 +1,3 @@ -SET client_min_messages = warning; -CREATE EXTENSION IF NOT EXISTS vector; SET enable_seqscan = off; CREATE UNLOGGED TABLE t (val vector(3));