Skip to content

Commit 882251a

Browse files
committed
fix: Simplify sqllogictest binary retrieval in extended tests workflow
1 parent ceb7d76 commit 882251a

1 file changed

Lines changed: 2 additions & 19 deletions

File tree

.github/workflows/extended.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -170,25 +170,8 @@ jobs:
170170
- name: Build sqllogictest binary
171171
run: |
172172
# Cargo emits test binaries with hashed filenames under target/.../deps.
173-
TEST_BIN=$(cargo build --profile release-nonlto --features backtrace,parquet_encryption --package datafusion-sqllogictest --test sqllogictests --message-format=json | python - <<'PY'
174-
import json
175-
import sys
176-
177-
for line in sys.stdin:
178-
try:
179-
payload = json.loads(line)
180-
except json.JSONDecodeError:
181-
continue
182-
if payload.get("reason") != "compiler-artifact":
183-
continue
184-
target = payload.get("target") or {}
185-
if target.get("name") == "sqllogictests" and "test" in target.get("kind", []):
186-
executable = payload.get("executable")
187-
if executable:
188-
print(executable)
189-
break
190-
PY
191-
)
173+
# We use head to pick the first matching sqllogictests artifact from the JSON stream.
174+
TEST_BIN=$(cargo build --profile release-nonlto --features backtrace,parquet_encryption --package datafusion-sqllogictest --test sqllogictests --message-format=json | sed -n 's/.*"executable":"\([^"]*\)".*/\1/p' | head -n 1)
192175
if [ -z "$TEST_BIN" ]; then
193176
echo "Could not find sqllogictests test binary"
194177
exit 1

0 commit comments

Comments
 (0)