Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 162 additions & 0 deletions .github/workflows/scylla-driver-testpy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
name: Scylla test.py driver compatibility

on:
push:
branches:
- master
- 'branch-**'
paths:
- cassandra/**
- tests/**
- scripts/run_scylla_driver_testpy.sh
- scripts/scylla-driver-testpy-tests.txt
- .github/workflows/scylla-driver-testpy.yml
- pyproject.toml
- uv.lock
- setup.py
pull_request:
paths:
- cassandra/**
- tests/**
- scripts/run_scylla_driver_testpy.sh
- scripts/scylla-driver-testpy-tests.txt
- .github/workflows/scylla-driver-testpy.yml
- pyproject.toml
- uv.lock
- setup.py
workflow_dispatch:

jobs:
testpy-driver-compat:
name: latest Scylla release test.py driver subset
if: "!contains(github.event.pull_request.labels.*.name, 'disable-integration-tests')"
runs-on: ubuntu-24.04
timeout-minutes: 120
env:
GET_VERSION_VERSION: 0.4.3
TOXIPROXY_VERSION: 2.12.0

steps:
- name: Checkout driver
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install system dependencies
run: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
curl \
libaio1t64 \
libev4 \
libev-dev \
ldap-utils \
sasl2-bin \
slapd \
tar \
unzip
sudo mkdir -p /etc/openldap
sudo ln -sfn /etc/ldap/schema /etc/openldap/schema
if command -v apparmor_parser >/dev/null 2>&1 && [[ -f /etc/apparmor.d/usr.sbin.slapd ]]; then
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.slapd || true
fi
echo /usr/sbin >> "$GITHUB_PATH"

- name: Install Scylla test.py service tools
run: |
mkdir -p "$RUNNER_TEMP/bin"
curl -fsSLo "$RUNNER_TEMP/bin/minio" https://dl.min.io/server/minio/release/linux-amd64/minio
curl -fsSLo "$RUNNER_TEMP/bin/mc" https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x "$RUNNER_TEMP/bin/minio" "$RUNNER_TEMP/bin/mc"
curl -fsSL "https://github.com/Shopify/toxiproxy/releases/download/v${TOXIPROXY_VERSION}/toxiproxy_${TOXIPROXY_VERSION}_linux_amd64.tar.gz" \
| tar -xz -C "$RUNNER_TEMP/bin" toxiproxy-server toxiproxy-cli
printf '%s\n' \
'#!/usr/bin/env bash' \
'exec /usr/sbin/slapd -u "$(id -un)" -g "$(id -gn)" "$@"' \
> "$RUNNER_TEMP/bin/slapd"
chmod +x "$RUNNER_TEMP/bin/slapd"
echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"

- name: Install get-version
run: |
mkdir -p "$RUNNER_TEMP/bin"
curl -fsSLo "$RUNNER_TEMP/get-version.zip" \
"https://github.com/scylladb-actions/get-version/releases/download/v${GET_VERSION_VERSION}/get-version_${GET_VERSION_VERSION}_linux_amd64v3.zip"
unzip -q -o "$RUNNER_TEMP/get-version.zip" -d "$RUNNER_TEMP/bin"
chmod +x "$RUNNER_TEMP/bin/get-version"
Comment on lines +100 to +104
echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"

- name: Resolve latest stable Scylla release
id: scylla-release
run: |
stable_filter='^[0-9]{4}$.^[0-9]+$.^[0-9]+$ and LAST.LAST.LAST'
docker_version="$(get-version --source dockerhub-imagetag --repo scylladb/scylla -filters "$stable_filter" | tr -d '"')"
github_version="$(get-version --source github-tag --repo scylladb/scylladb --prefix scylla- --out-no-prefix --filters "$stable_filter" | tr -d '"')"
if [[ -z "$docker_version" || -z "$github_version" ]]; then
echo "Failed to resolve latest stable Scylla release" >&2
exit 1
fi
if [[ "$docker_version" != "$github_version" ]]; then
echo "Latest stable Scylla release mismatch: DockerHub=$docker_version GitHub=$github_version" >&2
exit 1
fi
git ls-remote --exit-code --refs --tags https://github.com/scylladb/scylladb.git "refs/tags/scylla-$docker_version"
echo "version=$docker_version" >> "$GITHUB_OUTPUT"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

scylladb-actions get-version v0.4.3 CLI filters flag syntax documentation

💡 Result:

The scylladb-actions/get-version tool, including version v0.4.3, utilizes a filter syntax that supports pattern matching and global position selection to filter software versions [1]. Filter Syntax Overview The tool's filter system allows for combining different types of filters using 'and' / 'or' operators [1]. 1. Pattern Filters (Component-Level): These match specific semantic version components (e.g., Major.Minor.Patch) [1]. Regular expressions are commonly used here to match version segments, such as "^[0-9]{4}$.^[0-9]+$.^[0-9]+$" [2][3][4]. 2. Global Position Filters (List-Level): These allow selection of versions based on their position in the sorted list, such as using 'LAST' to get the newest version, or 'LAST-1' to get the second-newest [1][2][3]. CLI Usage The syntax for applying filters in the CLI is:./get-version --source --repo --filters "" [1] Example usage frequently seen in ScyllaDB repositories involves concatenating pattern and position filters:./get-version --source dockerhub-imagetag --repo scylladb/scylla -filters "^[0-9]{4}$.^[0-9]+$.^[0-9]+$ and LAST.1.LAST" [2][3][4] In this example, the filter matches a specific version pattern and selects a version based on its positional index (LAST, 1, LAST) [1][2]. Note that in some implementation contexts, users pipe the output to tr -d '"' to strip quotation marks [2][3][4].

Citations:


🌐 Web query:

GitHub scylladb-actions get-version v0.4.3 command line options single dash filters

💡 Result:

In the scylladb-actions/get-version tool, command-line arguments are typically specified using double dashes (e.g., --filters, --source, --repo) [1]. While some real-world usage examples in CI workflows have occasionally used a single dash for the filters flag (e.g., -filters) [2][3][4][5][6], this is a deviation from standard CLI conventions rather than a supported feature for "single dash filters." The official documentation and repository usage demonstrate the use of double dashes for flags [1]. The filters option accepts a specific syntax for semantic version filtering, which can include pattern matching and positional keywords like LAST [1]. If you encounter documentation or scripts referencing -filters, it should be interpreted as the --filters option [1][2]. It is recommended to use the standard double-dash syntax (--filters) to ensure compatibility and adhere to the tool's intended interface [1].

Citations:


🌐 Web query:

site:github.com/scylladb-actions/get-version v0.4.3 "long-flags" "short-flags" "-filter"

💡 Result:

There is no widely recognized software documentation or standard library for v0.4.3 that explicitly defines the terms long-flags and short-flags as formal nomenclature in the context of a -filter argument [1]. The terms long flags and short flags are common industry vernacular used to describe command-line interface arguments, where short flags are typically single characters preceded by a single dash (e.g., -f) and long flags are descriptive names preceded by double dashes (e.g., --filter) [1]. The provided search results indicate that the scylladb-actions/get-version tool uses a --filters argument to support complex version matching, but it does not use the specific phrasing long-flags or short-flags in its documentation [1]. If you are encountering these terms in a specific software package or library, it is likely that the author is using these descriptive names to distinguish between flag formats rather than referencing a version-specific feature of v0.4.3.

Citations:


🌐 Web query:

scylladb csharp-driver .github get-version -filters "and LAST"

💡 Result:

The latest release version of the ScyllaDB C# Driver as of July 27, 2026, is v3.22.0.2, which was released on December 1, 2025 [1]. You can find this package on NuGet under the name ScyllaDBCSharpDriver [1][2]. To get the version of the driver in your own project, you can typically inspect the assembly version or the package version defined in your project file (e.g.,.csproj) [2]. For further details: - GitHub Repository: https://github.com/scylladb/csharp-driver [1] - Official Documentation: https://csharp-driver.docs.scylladb.com/ [3] - NuGet Gallery: https://www.nuget.org/packages/ScyllaDBCSharpDriver [2]

Citations:


🌐 Web query:

scylladb driver tests get-version -filters LAST.scylla-"

💡 Result:

The syntax LAST.scylla-" or more commonly LAST.LAST.LAST-X is used within ScyllaDB's CI/CD automation and helper scripts to dynamically resolve and fetch specific versions of ScyllaDB from container registries (such as Docker Hub) [1][2]. These strings are arguments passed to a utility tool typically called get-version (or a similar version-fetching script like version_fetch.py) [1][2][3]. This tool parses version tags from a repository (e.g., scylladb/scylla) based on defined filters to automate the testing of drivers against various ScyllaDB releases [1][2]. The components of these strings generally follow a pattern based on MAJOR.MINOR.PATCH semantic versioning [4]: 1. LAST.LAST.LAST-X: This refers to the most recent release, where X is an offset to select previous patch or minor versions (e.g., LAST.LAST.LAST-1 selects the prior patch version) [1][2]. 2. LAST.1.LAST or LAST-1.1.LAST: These variations are often used to identify specific Long-Term Support (LTS) release streams by targeting the appropriate MAJOR.MINOR segments [1][2]. These mechanisms ensure that integration tests for ScyllaDB drivers (such as the C#, Go, and C++ drivers) can be automatically configured to run against the latest supported or prior versions without manual hardcoding [1][2][3].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow target =="
if [ -f .github/workflows/scylla-driver-testpy.yml ]; then
  sed -n '70,115p' .github/workflows/scylla-driver-testpy.yml
else
  echo "workflow file missing"
fi

echo
echo "== get-version usage and references in repository =="
rg -n -- hidden --glob '!node_modules/**' --glob '!build/**' --glob '!dist/**' 'get-version|--source|--repo|--filters|-filters|scylladb-actions/get-version' .github workflows . 2>/dev/null | head -200

echo
echo "== files likely defining provider CLI options =="
rg -n --hidden --glob '!node_modules/**' --glob '!build/**' --glob '!dist/**' 'long-flags|AcceptMultiple\(--filters|--Filters|-filters|--filters|flag\.String\|--filters|Flags' . 2>/dev/null | head -200

Repository: scylladb/python-driver

Length of output: 3029


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== exact matches for get-version option syntax =="
rg -n --hidden --glob '!node_modules/**' --glob '!build/**' --glob '!dist/**' --glob '!docs/**' --glob '!tests/**' --glob '!*.lock' '(\bget-version\b|scylladb-actions/get-version)' . 2>/dev/null | head -200

echo
echo "== inspect variable declaration for GET_VERSION_VERSION =="
rg -n --hidden --glob '!node_modules/**' --glob '!build/**' --glob '!dist/**' 'GET_VERSION_VERSION|github\.scylladb' .github workflows 2>/dev/null || true

Repository: scylladb/python-driver

Length of output: 1913


🏁 Script executed:

#!/bin/bash
set -euo pipefail

tmp="$(mktemp -d)"
echo "$tmp" > /tmp/get-version-dl-tmp.txt

echo "== download v0.4.3 go-getversion docs/list of binary? =="
python3 - <<'PY'
import http.client, urllib.request

url = "https://github.com/scylladb-actions/get-version/releases/download/v0.4.3/get-version_0.4.3_linux_amd64v3.zip"
try:
    with urllib.request.urlopen(url, timeout=20) as r:
        print("status=", r.status, "content-type=", r.getheader("Content-Type"), "len=", len(r.read()))
except Exception as e:
    print("download error:", type(e).__name__, e)
PY

echo
echo "== fetch Go source from release assets? =="
python3 - <<'PY'
import urllib.request
for asset in (
    "https://github.com/scylladb-actions/get-version/releases/download/v0.4.3/get-version.go",
    "https://raw.githubusercontent.com/scylladb-actions/get-version/v0.4.3/get-version.go",
    "https://raw.githubusercontent.com/scylladb-actions/get-version/v0.4.3/main.go",
):
    try:
        data = urllib.request.urlopen(asset, timeout=20).read().decode("utf-8")
    except Exception as e:
        print("asset", asset, "ERROR", type(e).__name__, e)
        continue
    print("asset", asset, "FOUND", len(data), "bytes")
    for needle in ("filters", "Flags", "flag.", "--filters", "-filters"):
        if needle in data:
            print(" contains", needle)
    print("--- relevant lines ---")
    nums = [str(n+1) for n, line in enumerate(data.splitlines()) if needle in line for needle in ("filters", "flag.", "--filters", "-filters", "Positional")]
    # not used in previous line because undefined but ok
    for i,line in enumerate(data.splitlines()[70:190], start=71):
        if "filters" in line or "Source" in line or "Repo" in line:
            print(f"{i}: {line}")
PY

Repository: scylladb/python-driver

Length of output: 1140


Use the documented get-version option spellings.

-filters is not the standard long flag for this CLI; use --filters consistently with --source, --repo, --prefix, and --out-no-prefix so DockerHub tag resolution doesn’t fail parsing the command-line contract.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/scylla-driver-testpy.yml around lines 88 - 103, Update
both get-version invocations in the “Resolve latest stable Scylla release” step
to use the documented --filters option spelling, preserving the existing
stable_filter value and all other arguments.


- name: Checkout matching Scylla test.py
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: scylladb/scylladb
ref: scylla-${{ steps.scylla-release.outputs.version }}
path: scylladb
fetch-depth: 1

- name: Prepare Scylla test.py host compatibility
run: |
if [[ -f /usr/lib/ldap/back_mdb.so ]] && ! grep -q '^moduleload back_mdb' scylladb/test/resource/slapd.conf; then
sed -i '1imoduleload back_mdb\nmodulepath /usr/lib/ldap' scylladb/test/resource/slapd.conf
fi

- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: "3.13"

- name: Build driver
run: uv sync --no-dev

- name: Install ccm and Scylla test.py Python dependencies
run: |
uv pip install \
"ccm @ git+https://github.com/scylladb/scylla-ccm.git@master" \
aiohttp \
allure-pytest \
colorama \
cryptography \
humanfriendly \
psutil \
PyKMIP \
"pytest~=8.0" \
pytest-asyncio \
pytest-repeat \
pytest-timeout \
pytest-xdist \
requests \
sqlalchemy \
treelib \
unidiff \
universalasync

- name: Cache Scylla ccm download
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/.ccm/repository
~/.ccm/scylla-repository
key: scylla-ccm-release-${{ steps.scylla-release.outputs.version }}-${{ runner.os }}

- name: Run Scylla test.py driver subset
env:
SCYLLA_SOURCE_DIR: ${{ github.workspace }}/scylladb
SCYLLA_TESTPY_TMPDIR: ${{ runner.temp }}/scylla-testpy
SCYLLA_VERSION: ${{ steps.scylla-release.outputs.version }}
run: scripts/run_scylla_driver_testpy.sh
219 changes: 219 additions & 0 deletions scripts/run_scylla_driver_testpy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
#!/usr/bin/env bash
set -euo pipefail

stable_release_filter='^[0-9]{4}$.^[0-9]+$.^[0-9]+$ and LAST.LAST.LAST'
download_cluster_name="${SCYLLA_CCM_DOWNLOAD_CLUSTER:-scylla-driver-testpy-download}"

driver_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
source_dir="${SCYLLA_SOURCE_DIR:-$driver_root/scylladb}"
tests_file="${SCYLLA_TESTPY_TESTS_FILE:-$driver_root/scripts/scylla-driver-testpy-tests.txt}"
tmpdir="${SCYLLA_TESTPY_TMPDIR:-${TMPDIR:-/tmp}/scylla-driver-testpy}"
jobs="${SCYLLA_TESTPY_JOBS:-1}"
max_failures="${SCYLLA_TESTPY_MAX_FAILURES:-1}"
timeout="${SCYLLA_TESTPY_TIMEOUT:-1800}"
session_timeout="${SCYLLA_TESTPY_SESSION_TIMEOUT:-7200}"

trim() {
local value="$1"
value="${value#"${value%%[![:space:]]*}"}"
value="${value%"${value##*[![:space:]]}"}"
printf '%s' "$value"
}

resolve_latest_stable_release() {
local docker_version github_version

if ! command -v get-version >/dev/null 2>&1; then
echo "get-version is required when SCYLLA_VERSION is not set" >&2
return 1
fi

docker_version="$(get-version \
--source dockerhub-imagetag \
--repo scylladb/scylla \
-filters "$stable_release_filter" | tr -d '"')"
github_version="$(get-version \
--source github-tag \
--repo scylladb/scylladb \
--prefix scylla- \
--out-no-prefix \
--filters "$stable_release_filter" | tr -d '"')"

if [[ -z "$docker_version" || -z "$github_version" ]]; then
echo "failed to resolve latest stable Scylla release" >&2
return 1
fi
if [[ "$docker_version" != "$github_version" ]]; then
echo "latest Scylla release mismatch: DockerHub=$docker_version GitHub=$github_version" >&2
return 1
fi

printf '%s' "$docker_version"
}

read_selected_tests() {
local line selected
selected=()
while IFS= read -r line || [[ -n "$line" ]]; do
line="${line%%#*}"
line="$(trim "$line")"
[[ -z "$line" ]] && continue
selected+=("$line")
done < "$tests_file"
printf '%s\n' "${selected[@]}"
}

find_scylla_executable() {
local version="$1"
local candidate
local -a candidates=(
"$HOME/.ccm/scylla-repository/release/$version/bin/scylla"
"$HOME/.ccm/repository/scylla-repository/release/$version/bin/scylla"
)

for candidate in "${candidates[@]}"; do
if [[ -x "$candidate" ]]; then
printf '%s' "$candidate"
return 0
fi
done

while IFS= read -r candidate; do
if [[ -x "$candidate" ]]; then
printf '%s' "$candidate"
return 0
fi
done < <(find "$HOME/.ccm" -type f -path "*/release/$version/bin/scylla" 2>/dev/null | sort)

return 1
}

pull_scylla_with_ccm() {
local version="$1"
local ccm="${CCM:-$driver_root/.venv/bin/ccm}"

if [[ ! -x "$ccm" ]]; then
ccm="$(command -v ccm || true)"
fi
if [[ -z "$ccm" || ! -x "$ccm" ]]; then
echo "ccm is required to download Scylla release binaries" >&2
return 1
fi

"$ccm" remove "$download_cluster_name" >/dev/null 2>&1 || true
"$ccm" create "$download_cluster_name" -n 1 --scylla --version "release:$version"
"$ccm" remove "$download_cluster_name" >/dev/null 2>&1 || true
}

validate_selected_tests() {
local test_id test_file missing=0
for test_id in "$@"; do
test_file="${test_id%%::*}"
if [[ ! -f "$source_dir/$test_file" ]]; then
echo "missing Scylla test file for $test_id" >&2
missing=1
fi
done
return "$missing"
}

main() {
local version scylla_exe python_bin
local list_tests=0
local -a tests passthrough_args pytest_args

if [[ ! -f "$tests_file" ]]; then
echo "test selection file does not exist: $tests_file" >&2
return 1
fi
if [[ ! -f "$source_dir/test.py" ]]; then
echo "Scylla source checkout with test.py is required at: $source_dir" >&2
return 1
fi

mapfile -t tests < <(read_selected_tests)
if [[ "${#tests[@]}" -eq 0 ]]; then
echo "no Scylla tests selected in $tests_file" >&2
return 1
fi
validate_selected_tests "${tests[@]}"

version="${SCYLLA_VERSION:-}"
if [[ -z "$version" || "$version" == "latest" ]]; then
version="$(resolve_latest_stable_release)"
fi
version="${version#release:}"

echo "Scylla release: $version"
echo "Scylla source: $source_dir"
echo "Selected Scylla tests (${#tests[@]}):"
printf ' %s\n' "${tests[@]}"

if [[ "${SCYLLA_TESTPY_DRY_RUN:-0}" == "1" ]]; then
return 0
fi

scylla_exe="${SCYLLA_EXE:-}"
if [[ -z "$scylla_exe" ]]; then
if ! scylla_exe="$(find_scylla_executable "$version")"; then
pull_scylla_with_ccm "$version"
scylla_exe="$(find_scylla_executable "$version")"
fi
fi
if [[ ! -x "$scylla_exe" ]]; then
echo "Scylla executable is not available or executable: $scylla_exe" >&2
return 1
fi
Comment on lines +183 to +193

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Second find_scylla_executable call can abort before the intended error message.

After pull_scylla_with_ccm, scylla_exe="$(find_scylla_executable "$version")" (line 160) is a plain assignment, not inside a conditional. Under set -e, if find_scylla_executable still can't find the binary (returns 1), the script exits immediately here rather than reaching the descriptive "Scylla executable is not available or executable" message on lines 163-166, making CI failures harder to diagnose.

🐛 Proposed fix
     if ! scylla_exe="$(find_scylla_executable "$version")"; then
         pull_scylla_with_ccm "$version"
-        scylla_exe="$(find_scylla_executable "$version")"
+        scylla_exe="$(find_scylla_executable "$version")" || true
     fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
scylla_exe="${SCYLLA_EXE:-}"
if [[ -z "$scylla_exe" ]]; then
if ! scylla_exe="$(find_scylla_executable "$version")"; then
pull_scylla_with_ccm "$version"
scylla_exe="$(find_scylla_executable "$version")"
fi
fi
if [[ ! -x "$scylla_exe" ]]; then
echo "Scylla executable is not available or executable: $scylla_exe" >&2
return 1
fi
scylla_exe="${SCYLLA_EXE:-}"
if [[ -z "$scylla_exe" ]]; then
if ! scylla_exe="$(find_scylla_executable "$version")"; then
pull_scylla_with_ccm "$version"
scylla_exe="$(find_scylla_executable "$version")" || true
fi
fi
if [[ ! -x "$scylla_exe" ]]; then
echo "Scylla executable is not available or executable: $scylla_exe" >&2
return 1
fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/run_scylla_driver_testpy.sh` around lines 156 - 166, Update the
fallback `find_scylla_executable` call in the executable discovery flow to run
in a conditional or otherwise suppress `set -e` termination when it fails.
Preserve the subsequent `scylla_exe` validation so failures reach the existing
descriptive error message and return path.


python_bin="${PYTHON:-$driver_root/.venv/bin/python}"
if [[ ! -x "$python_bin" ]]; then
python_bin="$(command -v python3 || command -v python)"
fi

echo "Scylla executable: $scylla_exe"

passthrough_args=()
for arg in "$@"; do
if [[ "$arg" == "--list" ]]; then
list_tests=1
else
passthrough_args+=("$arg")
fi
done

pytest_args=(
-p test.pylib.runner
--color=yes
--repeat=1
--exe-path "$scylla_exe"
--tmpdir "$tmpdir"
)
if [[ "$list_tests" == "1" ]]; then
pytest_args+=(--collect-only --quiet --no-header)
else
pytest_args+=(
--junit-xml "$tmpdir/report/pytest_driver_compat.xml"
-rf
-n "$jobs"
--maxfail "$max_failures"
--alluredir "$tmpdir/report/allure_driver_compat"
--dist=worksteal
--allure-no-capture
--timeout "$timeout"
--session-timeout "$session_timeout"
--log-level=INFO
)
fi
pytest_args+=(
"${passthrough_args[@]}"
"${tests[@]}"
)

cd "$source_dir"
# Use Scylla's pytest runner plugin directly. The test.py wrapper probes
# configured build modes before its --exe-path hook can switch to custom_exe,
# which does not work for a source-only checkout plus a ccm-downloaded binary.
"$python_bin" -m pytest "${pytest_args[@]}"
}

main "$@"
Loading
Loading