8000 sample regress test · hscmgroup/postgres@51caded · GitHub
[go: up one dir, main page]

Skip to content

Commit 51caded

Browse files
oliricedarora
authored andcommitted
sample regress test
1 parent 059ac97 commit 51caded

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

flake.nix

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@
369369
in
370370
pkgs.runCommand "postgres-${pgpkg.version}-check-harness"
371371
{
372-
nativeBuildInputs = with pkgs; [ coreutils bash pgpkg pg_prove procps ];
372+
nativeBuildInputs = with pkgs; [ coreutils bash pgpkg pg_prove pg_regress procps ];
373373
} ''
374374
TMPDIR=$(mktemp -d)
375375
if [ $? -ne 0 ]; then
@@ -417,7 +417,22 @@
417417
done
418418
createdb -p 5432 -h localhost testing
419419
psql -p 5432 -h localhost -d testing -Xaf ${./nix/tests/prime.sql}
420-
pg_prove -p 5432 -h localhost -d testing ${sqlTests}/*.sql
420+
421+
422+
#pg_prove -p 5432 -h localhost -d testing ${sqlTests}/*.sql
423+
424+
mkdir regression_output
425+
pg_regress \
426+
--use-existing \
427+
--dbname=testing \
428+
--inputdir=${./nix/tests} \
429+
--outputdir=regression_output \
430+
$(ls ${./nix/tests/sql} | sed -e 's/\..*$//' | sort )
431+
432+
433+
mv regression.diffs $PWD
434+
mv regression_output $PWD
435+
421436
pg_ctl -D "$PGDATA" stop
422437
mv $TMPDIR/logfile/postgresql.log $out
423438
echo ${pgpkg}

nix/tests/expected/select_one.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1

nix/tests/sql/select_one.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
select 1;

0 commit comments

Comments
 (0)
0