Move to a separate script

add-check-for-gucs-order-1
Ahmet Gedemenli 2021-08-04 15:36:41 +03:00
parent 13500846e3
commit ca9b699525
3 changed files with 4 additions and 20 deletions

View File

@ -84,10 +84,7 @@ jobs:
command: ci/check_all_ci_scripts_are_run.sh
- run:
name: 'Check if all GUCs are sorted alphabetically'
command: |
set -euo pipefail
grep -o -E "(\.*\"citus.\w+\")," src/backend/distributed/shared_library_init.c > gucs.out
sort -c gucs.out
command: ci/check_gucs_are_alphabetically_sorted.sh
check-sql-snapshots:
docker:

View File

@ -0,0 +1,3 @@
set -euo pipefail
grep -o -E "(\.*\"citus.\w+\")," src/backend/distributed/shared_library_init.c > gucs.out
sort -c gucs.out

View File

@ -1,16 +0,0 @@
import os
fileDir = os.path.dirname(os.path.realpath('__file__'))
filename = os.path.join(fileDir, 'src/backend/distributed/shared_library_init.c')
shared_library_init = open(filename, 'r')
lines = shared_library_init.readlines()
getnextline = False
previous_guc = ''
for line in lines:
if getnextline:
if line < previous_guc:
exit(1)
previous_guc = line
getnextline = False
if 'DefineCustom' in line:
getnextline = True