Skip to content
Closed
Changes from 9 commits
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
17 changes: 12 additions & 5 deletions .github/workflows/extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,18 @@ jobs:
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- name: Build sqllogictest binary
run: |
TEST_BIN=$(cargo test --features backtrace,parquet_encryption --profile release-nonlto --test sqllogictests --no-run --message-format=json | sed -n 's/.*"executable":"\([^"]*\)".*/\1/p' | head -n 1)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rather than cargo test another idea would be to use cargo build 🤔

Also, what is the reason to use --message-format=json?

Finally, what is the head command for? I didn't see any obvious reason in

https://github.com/apache/datafusion/actions/runs/21890300850/job/63194519053

Perhaps you could add a comment explaining what those commands are for

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, good suggestions. I agree cargo build is clearer here since this step only compiles the sqllogictests target and does not run it.

I used --message-format=json to capture the exact emitted test binary path because Cargo places test executables under target/.../deps with a hash suffix. The head -n 1 was a simple way to select the first extracted executable path from the stream.

I’ll simplify and document this more clearly in the workflow so the intent is explicit.

if [ -z "$TEST_BIN" ]; then
echo "Could not find sqllogictests test binary"
exit 1
fi
echo "TEST_BIN=$TEST_BIN" >> "$GITHUB_ENV"
- name: Run sqllogictest
run: |
cargo test --features backtrace,parquet_encryption --profile release-nonlto --test sqllogictests -- --include-sqlite
(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why the ( and )?
Also, why does it need to do cd when the current version doesn't?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The cd is needed because sqllogictests resolves test data via relative paths (for example test_files/ and ../../datafusion-testing/data/ in datafusion/sqllogictest/bin/sqllogictests.rs), so running from repo root can point it at the wrong locations. I added it after an earlier version without cd errored with test_files/ not found.

The subshell (...) was only used to scope cd so it would not affect the subsequent cargo clean. It is not strictly necessary.

I’ll remove the subshell and switch to a cleaner step-level working-directory: datafusion/sqllogictest for the test execution step.

cd datafusion/sqllogictest
"$TEST_BIN" --include-sqlite
)
cargo clean