diff --git a/.editorconfig b/.editorconfig index b58696109..8091a1f57 100644 --- a/.editorconfig +++ b/.editorconfig @@ -17,12 +17,6 @@ trim_trailing_whitespace = true insert_final_newline = unset trim_trailing_whitespace = unset -# Don't change test/regress/output directory, this needs to be a separate rule -# for some reason -[/src/test/regress/output/**] -insert_final_newline = unset -trim_trailing_whitespace = unset - [*.{sql,sh,py}] indent_style = space indent_size = 4 diff --git a/.gitattributes b/.gitattributes index f8fea016a..0c508dff2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -16,7 +16,6 @@ README.* conflict-marker-size=32 # Test output files that contain extra whitespace *.out -whitespace -src/test/regress/output/*.source -whitespace # These files are maintained or generated elsewhere. We take them as is. configure -whitespace diff --git a/ci/README.md b/ci/README.md index 31fdb7e0e..2d8889f14 100644 --- a/ci/README.md +++ b/ci/README.md @@ -363,11 +363,8 @@ This was deemed to be error prone and not worth the effort. This script checks and fixes issues with `.gitignore` rules: -1. Makes sure git ignores the `.sql` files and expected output files that are generated - from `.source` template files. If you created or deleted a `.source` file in a commit, - git ignore rules should be updated to reflect this change. -2. Makes sure we do not commit any generated files that should be ignored. If there is an +1. Makes sure we do not commit any generated files that should be ignored. If there is an ignored file in the git tree, the user is expected to review the files that are removed from the git tree and commit them. diff --git a/ci/check_all_tests_are_run.sh b/ci/check_all_tests_are_run.sh index bc7568c08..4eadbf79f 100755 --- a/ci/check_all_tests_are_run.sh +++ b/ci/check_all_tests_are_run.sh @@ -7,13 +7,12 @@ source ci/ci_helpers.sh cd src/test/regress -# 1. Find all *.sql *.spec and *.source files in the sql, spec and input -# directories +# 1. Find all *.sql and *.spec files in the sql, and spec directories # 2. Strip the extension and the directory # 3. Ignore names that end with .include, those files are meant to be in an C # preprocessor #include statement. They should not be in schedules. test_names=$( - find sql spec input -iname "*.sql" -o -iname "*.spec" -o -iname "*.source" | + find sql spec -iname "*.sql" -o -iname "*.spec" | sed -E 's#^\w+/([^/]+)\.[^.]+$#\1#g' | grep -v '.include$' ) diff --git a/ci/fix_gitignore.sh b/ci/fix_gitignore.sh index a2258c472..50f0a43bb 100755 --- a/ci/fix_gitignore.sh +++ b/ci/fix_gitignore.sh @@ -1,24 +1,8 @@ #! /bin/bash -# shellcheck disable=SC2012 - set -euo pipefail # shellcheck disable=SC1091 source ci/ci_helpers.sh -# We list all the .source files in alphabetical order, and do a substitution -# before writing the resulting file names that are created by those templates in -# relevant .gitignore files -# -# 1. Capture the file name without the .source extension -# 2. Add the desired extension at the end -# 3. Add a / character at the beginning of each line to conform to .gitignore file format -# -# e.g. multi_copy.source -> /multi_copy.sql -ls -1 src/test/regress/input | sed -E "s#(.*)\.source#/\1.sql#" > src/test/regress/sql/.gitignore - -# e.g. multi_copy.source -> /multi_copy.out -ls -1 src/test/regress/output | sed -E "s#(.*)\.source#/\1.out#" > src/test/regress/expected/.gitignore - # Remove all the ignored files from git tree, and error out # find all ignored files in git tree, and use quotation marks to prevent word splitting on filenames with spaces in them ignored_lines_in_git_tree=$(git ls-files --ignored --exclude-standard | sed 's/.*/"&"/') diff --git a/src/backend/columnar/.gitattributes b/src/backend/columnar/.gitattributes index 215ae1909..b8e13a2ad 100644 --- a/src/backend/columnar/.gitattributes +++ b/src/backend/columnar/.gitattributes @@ -16,7 +16,6 @@ README.* conflict-marker-size=32 # Test output files that contain extra whitespace *.out -whitespace -src/test/regress/output/*.source -whitespace # These files are maintained or generated elsewhere. We take them as is. configure -whitespace diff --git a/src/test/regress/Makefile b/src/test/regress/Makefile index 9689e7570..80ae38346 100644 --- a/src/test/regress/Makefile +++ b/src/test/regress/Makefile @@ -263,7 +263,7 @@ clean-upgrade-artifacts: rm -rf $(citus_abs_srcdir)/tmp_citus_tarballs/ $(citus_abs_srcdir)/tmp_citus_upgrade/ /tmp/citus_copy/ clean distclean maintainer-clean: - rm -f $(output_files) $(input_files) + rm -rf input/ output/ rm -rf tmp_check/ rm -rf tmp_citus_test/