github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/build/teamcity-testlogicrace.sh (about)

     1  #!/usr/bin/env bash
     2  set -euxo pipefail
     3  
     4  export BUILDER_HIDE_GOPATH_SRC=1
     5  
     6  source "$(dirname "${0}")/teamcity-support.sh"
     7  maybe_ccache
     8  
     9  mkdir -p artifacts
    10  
    11  run_json_test build/builder.sh \
    12    stdbuf -oL -eL \
    13    make testrace \
    14    GOTESTFLAGS=-json \
    15    PKG=./pkg/sql/logictest \
    16    TESTFLAGS='-v' \
    17    ENABLE_ROCKSDB_ASSERTIONS=1
    18  
    19  # Run each of the optimizer tests again with randomized alternate query plans.
    20  
    21  # Perturb the cost of each expression by up to 90%.
    22  run_json_test build/builder.sh \
    23    stdbuf -oL -eL \
    24    make testrace \
    25    GOTESTFLAGS=-json \
    26    PKG=./pkg/sql/logictest \
    27    TESTS='^TestLogic/local$$' \
    28    TESTFLAGS='-optimizer-cost-perturbation=0.9 -v' \
    29    ENABLE_ROCKSDB_ASSERTIONS=1
    30  
    31  LOGICTESTS=`ls -A pkg/sql/logictest/testdata/logic_test/`
    32  
    33  # Exclude the following tests when running with -disable-opt-rule-probability.
    34  # These files either do not use the opt configurations or contain queries that
    35  # rely on normalization rules for optimization, to avoid out-of-memory errors,
    36  # or for subquery decorrelation.
    37  EXCLUDE="(cluster_version|distsql_.*|explain_analyze.*|feature_counts|join|\
    38  optimizer|orms|sequences_distsql|show_trace|subquery_correlated)"
    39  
    40  # Disable each rule with 50% probability.
    41  for file in $LOGICTESTS; do
    42      if [[ ! "$file" =~ (^|[[:space:]])${EXCLUDE}($|[[:space:]]) ]]; then
    43          run_json_test build/builder.sh \
    44            stdbuf -oL -eL \
    45            make testrace \
    46      GOTESTFLAGS=-json \
    47            PKG=./pkg/sql/logictest \
    48            TESTS='^TestLogic/local/'${file}'$$' \
    49            TESTFLAGS='-disable-opt-rule-probability=0.5 -v' \
    50            ENABLE_ROCKSDB_ASSERTIONS=1 \
    51      fi
    52  done