提交 20d7f010 编写于 作者: A Asim R P

Fix the script to check flaky test schedules

The regex used in the script was too strict.  Relax the regex so as to
match 'select distinct gp_inject_fault(...);'.  The script may be
invoked against a directory, such as src/test/fsync, which may not
contain any schedule files.  This no longer results in an error.  When
invoked against isolation directory, it should scan tests under
'specs' subdir.  Not all of input, sql and specs subdirs exist always,
so add a '-s' option to grep to mask errors reporting non-existance.
Co-authored-by: NHao Wu <gfphoenix78@gmail.com>
上级 ba7dc5a4
......@@ -42,9 +42,10 @@ test: leastsquares opr_sanity_gp decode_expr bitmapscan bitmapscan_ao case_gp li
test: gpcopy
test: orca_static_pruning
test: filter gpctas gpdist gpdist_opclasses gpdist_legacy_opclasses matrix toast sublink table_functions olap_setup complex opclass_ddl information_schema guc_env_var gp_explain distributed_transactions explain_format olap_plans misc_jiras
test: filter gpctas gpdist gpdist_opclasses gpdist_legacy_opclasses matrix sublink table_functions olap_setup complex opclass_ddl information_schema guc_env_var gp_explain distributed_transactions explain_format olap_plans misc_jiras
# below test(s) inject faults so each of them need to be in a separate group
test: guc_gp
test: toast
# namespace_gp test will show diff if concurrent tests use temporary tables.
# So run it separately.
......
......@@ -12,14 +12,14 @@ parallel_tests=$(mktemp parallel_tests.XXX)
retcode=0
# list the tests that inject faults
grep -ERIli '(select|perform)\s+gp_inject_fault' sql input \
grep -sERIli '(select|perform)\s.*gp_inject_fault' sql input specs \
| sed 's,^[^/]*/\(.*\)\.[^.]*$,\1,' \
| sort -u \
> $fault_injection_tests
echo "scanning for flaky fault-injection tests..."
for schedule in *_schedule; do
for schedule in $(ls *schedule 2>&1 | grep -v 'No such file'); do
# list the tests that are in parallel testing groups
grep -E '^test:(\s+\S+){2,}' $schedule \
| cut -d' ' -f2- \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册