Skip to content

Commit

Permalink
Move test files into "test" directory
Browse files Browse the repository at this point in the history
  • Loading branch information
za-arthur authored and akorotkov committed Dec 19, 2024
1 parent def5b5e commit 0f8f619
Show file tree
Hide file tree
Showing 187 changed files with 77 additions and 69 deletions.
15 changes: 8 additions & 7 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@
**/lib*.pc

# Local excludes in root directory
t/__pycache__/
log/
test/t/__pycache__/
test/__pycache__/
test/log/
log_docker_build/
results/
tmp_check/
tmp_check_iso/
output_iso/
test/results/
test/tmp_check/
test/tmp_check_iso/
test/output_iso/
include/utils/stopevents_defs.h
include/utils/stopevents_data.h
orioledb.typedefs
Expand Down Expand Up @@ -81,4 +82,4 @@ ci/docker_matrix.sh
doc/

# Exclude the PostGIS Docker build directory
docker-postgis
docker-postgis
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,18 @@ lib*dll.def
lib*.pc

# Local excludes in root directory
/t/__pycache__/
/log/
/test/t/__pycache__/
/test/__pycache__/
/test/log/
/log_docker_build/
/results/
/tmp_check/
/tmp_check_iso/
/output_iso/
/test/results/
/test/tmp_check/
/test/tmp_check_iso/
/test/output_iso/
/include/utils/stopevents_defs.h
/include/utils/stopevents_data.h
/orioledb.typedefs
!ci/antithesis/libvoidstar.so

# Exclude the PostGIS Docker build directory
/docker-postgis
/docker-postgis
95 changes: 49 additions & 46 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,44 +140,47 @@ ISOLATIONCHECKS = bitmap_hist_scan \
rll_subtrans \
table_lock_test \
uniq
TESTGRESCHECKS_PART_1 = t/checkpointer_test.py \
t/eviction_bgwriter_test.py \
t/eviction_compression_test.py \
t/eviction_test.py \
t/file_operations_test.py \
t/files_test.py \
t/incomplete_split_test.py \
t/merge_test.py \
t/o_tables_test.py \
t/o_tables_2_test.py \
t/recovery_test.py \
t/recovery_opclass_test.py \
t/recovery_worker_test.py \
t/replication_test.py \
t/types_test.py \
t/undo_eviction_test.py
TESTGRESCHECKS_PART_2 = t/checkpoint_concurrent_test.py \
t/checkpoint_eviction_test.py \
t/checkpoint_same_trx_test.py \
t/checkpoint_split1_test.py \
t/checkpoint_split2_test.py \
t/checkpoint_split3_test.py \
t/checkpoint_update_compress_test.py \
t/checkpoint_update_test.py \
t/ddl_test.py \
t/eviction_full_memory_test.py \
t/include_indices_test.py \
t/indices_build_test.py \
t/logical_test.py \
t/not_supported_yet_test.py \
t/parallel_test.py \
t/reindex_test.py \
t/s3_test.py \
t/schema_test.py \
t/toast_index_test.py \
t/trigger_test.py \
t/unlogged_test.py \
t/vacuum_test.py
TESTGRESCHECKS_PART_1 = test/t/checkpointer_test.py \
test/t/eviction_bgwriter_test.py \
test/t/eviction_compression_test.py \
test/t/eviction_test.py \
test/t/file_operations_test.py \
test/t/files_test.py \
test/t/incomplete_split_test.py \
test/t/merge_test.py \
test/t/o_tables_test.py \
test/t/o_tables_2_test.py \
test/t/recovery_test.py \
test/t/recovery_opclass_test.py \
test/t/recovery_worker_test.py \
test/t/replication_test.py \
test/t/types_test.py \
test/t/undo_eviction_test.py
TESTGRESCHECKS_PART_2 = test/t/checkpoint_concurrent_test.py \
test/t/checkpoint_eviction_test.py \
test/t/checkpoint_same_trx_test.py \
test/t/checkpoint_split1_test.py \
test/t/checkpoint_split2_test.py \
test/t/checkpoint_split3_test.py \
test/t/checkpoint_update_compress_test.py \
test/t/checkpoint_update_test.py \
test/t/ddl_test.py \
test/t/eviction_full_memory_test.py \
test/t/include_indices_test.py \
test/t/indices_build_test.py \
test/t/logical_test.py \
test/t/not_supported_yet_test.py \
test/t/parallel_test.py \
test/t/reindex_test.py \
test/t/s3_test.py \
test/t/schema_test.py \
test/t/toast_index_test.py \
test/t/trigger_test.py \
test/t/unlogged_test.py \
test/t/vacuum_test.py

PG_REGRESS_ARGS=--no-locale --inputdir=test --outputdir=test


ifdef USE_PGXS
PG_CONFIG = pg_config
Expand All @@ -190,21 +193,19 @@ ifeq ($(shell expr $(MAJORVERSION) \>= 14), 1)
endif

ifeq ($(shell expr $(MAJORVERSION) \>= 15), 1)
TESTGRESCHECKS_PART_2 += t/merge_into_test.py
TESTGRESCHECKS_PART_2 += test/t/merge_into_test.py
ISOLATIONCHECKS += isol_merge
endif

PG_REGRESS_ARGS=--no-locale

regresscheck: | install
$(pg_regress_check) \
--temp-config orioledb_regression.conf \
--temp-config test/orioledb_regression.conf \
$(PG_REGRESS_ARGS) \
$(REGRESSCHECKS)

isolationcheck: | install
$(pg_isolation_regress_check) \
--temp-config orioledb_isolation.conf \
--temp-config test/orioledb_isolation.conf \
$(PG_REGRESS_ARGS) \
$(ISOLATIONCHECKS)

Expand All @@ -224,12 +225,14 @@ include $(top_srcdir)/contrib/contrib-global.mk

regresscheck: | submake-regress submake-orioledb temp-install
$(pg_regress_check) \
--temp-config $(top_srcdir)/contrib/orioledb/orioledb_regression.conf \
--temp-config $(top_srcdir)/contrib/orioledb/test/orioledb_regression.conf \
$(PG_REGRESS_ARGS) \
$(REGRESSCHECKS)

isolationcheck: | submake-isolation submake-orioledb temp-install
$(pg_isolation_regress_check) \
--temp-config $(top_srcdir)/contrib/orioledb/orioledb_isolation.conf \
--temp-config $(top_srcdir)/contrib/orioledb/test/orioledb_isolation.conf \
$(PG_REGRESS_ARGS) \
$(ISOLATIONCHECKS)

$(TESTGRESCHECKS_PART_1) $(TESTGRESCHECKS_PART_2): | submake-orioledb temp-install
Expand Down Expand Up @@ -311,7 +314,7 @@ pgindent: orioledb.typedefs
include/*/*.h

yapf:
yapf -i t/*.py
yapf -i test/t/*.py
yapf -i *.py

.PHONY: submake-orioledb submake-regress check \
Expand Down
17 changes: 10 additions & 7 deletions doc/contributing/structure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,25 @@ orioledb
|
|- ci -- scripts used within build.yml workflow
|- doc -- documentation
|- expected -- expected output for regression and isolation tests
|- include -- C-headers of extension
|- specs -- isolation tests
|- sql -- regression tests
|- src -- C-sources of extension
|- t -- python tests
|
|- test
| |- expected -- expected output for regression and isolation tests
| |- specs -- isolation tests
| |- sql -- regression tests
| |- t -- python tests
| |- tests -- Docker images tests
| |- README.md -- Docker images tests documentation
| |- orioledb-config.sh -- Docker images tests configuration
| |- orioledb_isolation.conf -- configuration file used during isolation tests
| |- orioledb_regression.conf -- configuration file used during regression tests
|- Dockerfile -- Dockerfile used within docker.yml workflow
|- LICENSE -- defines PostgreSQL-licence for the project
|- Makefile -- defines make targets
|- README.md -- main documentation entrypoint
|- docker-entrypoint.sh -- entrypoint file for Docker images
|- orioledb--1.0.sql -- script for definition of extension SQL-level objects
|- orioledb.control -- extension control file
|- orioledb_isolation.conf -- configuration file used during isolation tests
|- orioledb_regression.conf -- configuration file used during regression tests
|- stopevents.txt -- list of "stop event"
|- stopevents_gen.py -- generates include/utils/stopevents_(defs|data).h from stopevents.txt
|- typedefs_gen.py -- generates list of C-symbols in orioledb.so to orioledb.typedefs
Expand Down
Empty file added test/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added test/t/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion t/s3_base_test.py β†’ test/t/s3_base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def __init__(self,
def download(self, path, verbose=False):
dir_path = os.path.dirname(os.path.realpath(__file__))
old_argv = sys.argv
sys.argv = [f"{dir_path}/../orioledb_s3_loader.py"]
sys.argv = [f"{dir_path}/../../orioledb_s3_loader.py"]
sys.argv += ["--endpoint", self._endpoint_url]
if self._prefix:
sys.argv += ["--prefix", self._prefix]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion t/types_test.py β†’ test/t/types_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setUpClass(cls):
@classmethod
def parse_sys_tree_names(cls):
dirname = os.path.dirname(__file__)
filename = os.path.join(dirname, '../include/catalog/sys_trees.h')
filename = os.path.join(dirname, '../../include/catalog/sys_trees.h')
f = open(filename, 'r')
pattern = re.compile(r"^#define SYS_TREES_(\w+)\s+\((\d+)\)")
line = f.readline()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0f8f619

Please sign in to comment.