Skip to content

Add schedule for regression tests. #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ master ]

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
build:
Expand All @@ -17,22 +17,25 @@ jobs:
steps:
- name: pg
run: |
sudo apt install libipc-run-perl
echo "Deploying to production server on branch" $BRANCH_NAME
git config --global user.email "[email protected]"
git config --global user.name "CI PgPro admin"
export COPT=-Werror
export CONFIGURE_OPTS="--prefix=`pwd`/tmp_install --enable-tap-tests --enable-cassert"
git clone https://github.com/postgres/postgres.git pg
cd pg
git checkout master
./configure --prefix=`pwd`/tmp_install CFLAGS="-O3"
./configure $CONFIGURE_OPTS CFLAGS="-O3"
git clone https://github.com/postgrespro/aqo.git contrib/aqo
git -C contrib/aqo checkout $BRANCH_NAME
patch -p1 --no-backup-if-mismatch < contrib/aqo/aqo_master.patch
make -j4 > /dev/null && make -j4 -C contrib > /dev/null
env CLIENTS=50 THREADS=50 make -C contrib/aqo check

echo "Use AQO with debug code included"
git clean -fdx
git -C contrib/aqo clean -fdx
./configure --prefix=`pwd`/tmp_install CFLAGS="-DAQO_DEBUG_PRINT -O0"
./configure $CONFIGURE_OPTS CFLAGS="-DAQO_DEBUG_PRINT -O0"
make -j4 > /dev/null && make -j4 -C contrib > /dev/null
env CLIENTS=50 THREADS=50 make -C contrib/aqo check
24 changes: 4 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,10 @@ OBJS = $(WIN32RES) \

TAP_TESTS = 1

REGRESS = aqo_disabled \
aqo_controlled \
aqo_intelligent \
aqo_forced \
aqo_learn \
schema \
aqo_fdw \
aqo_CVE-2020-14350 \
gucs \
forced_stat_collection \
unsupported \
clean_aqo_data \
parallel_workers \
plancache \
statement_timeout \
temp_tables \
top_queries \
relocatable\
look_a_like \
feature_subspace
# Use an empty dummy test to define the variable REGRESS and therefore run all
# regression tests. regress_schedule contains the full list of real tests.
REGRESS = aqo_dummy_test
REGRESS_OPTS = --schedule=$(srcdir)/regress_schedule

fdw_srcdir = $(top_srcdir)/contrib/postgres_fdw
stat_srcdir = $(top_srcdir)/contrib/pg_stat_statements
Expand Down
Empty file added expected/aqo_dummy_test.out
Empty file.
22 changes: 22 additions & 0 deletions regress_schedule
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
test: aqo_disabled
test: aqo_controlled
test: aqo_intelligent
test: aqo_forced
test: aqo_learn
test: schema
test: aqo_fdw
test: aqo_CVE-2020-14350
test: gucs
test: forced_stat_collection
test: unsupported
test: clean_aqo_data
test: parallel_workers
test: plancache
# Performance-dependent test. Can be ignored if executes in containers or on slow machines
ignore: statement_timeout
test: statement_timeout
test: temp_tables
test: top_queries
test: relocatable
test: look_a_like
test: feature_subspace
Empty file added sql/aqo_dummy_test.sql
Empty file.
2 changes: 1 addition & 1 deletion t/001_pgbench.pl
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@
"SELECT sum(executions_with_aqo) FROM test.aqo_query_stat");

# 25 trans * 10 clients * 4 query classes = 1000 + unique SELECT to pgbench_branches
is($res, 1001, 'Each query should be logged in LEARN mode');
is($res, $ENV{CLIENTS}*100+1, 'Each query should be logged in LEARN mode');
$res = $node->safe_psql('postgres',
"SELECT sum(executions_without_aqo) FROM test.aqo_query_stat");
is($res, 0, 'AQO has learned on the queries - 2');
Expand Down