Skip to content

Conversation

@GuillaumeLagrange
Copy link
Contributor

No description provided.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 14, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing cod-1815-add-the-command-that-was-run-to-the-upload-payload-and (1ac1eae) with main (0cfb188)

Open in CodSpeed

Copy link
Member

@not-matthias not-matthias left a comment

Choose a reason for hiding this comment

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

I think we can improve the testing a bit, to avoid re-implementing the same set of shell tests in every new executor (lmk if there are any technical reasons that prevent this for the exec-harness).

Other than that, it looks pretty good. Next review should be quick :)

}

/// Test that a command with shell operators (&&) works correctly when passed as a single argument
#[test]
Copy link
Member

Choose a reason for hiding this comment

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

We also have the executor tests, which already include a lot of these edge cases:

const TESTS: [&str; 6] = [
// Simple echo command
"echo 'Hello, World!'",
// Multi-line commands without semicolons
"echo \"Working\"
echo \"with\"
echo \"multiple lines\"",
// Multi-line commands with semicolons
"echo \"Working\";
echo \"with\";
echo \"multiple lines\";",
// Directory change and validation
"cd /tmp
# Check that the directory is actually changed
if [ $(basename $(pwd)) != \"tmp\" ]; then
exit 1
fi",
// Quote escaping test
"#!/bin/bash
VALUE=\"He said \\\"Hello 'world'\\\" & echo \\$HOME\"
if [ \"$VALUE\" = \"He said \\\"Hello 'world'\\\" & echo \\$HOME\" ]; then
echo \"Quote test passed\"
else
echo \"ERROR: Quote handling failed\"
exit 1
fi",
// Command substitution test
"#!/bin/bash
RESULT=$(echo \"test 'nested' \\\"quotes\\\" here\")
COUNT=$(echo \"$RESULT\" | wc -w)
if [ \"$COUNT\" -eq \"4\" ]; then
echo \"Command substitution test passed\"
else
echo \"ERROR: Expected 4 words, got $COUNT\"
exit 1
fi",
];

We should test it there, so that we can reuse the existing test cases that ensure that the same shell scripts work across all executors.

Copy link
Contributor Author

@GuillaumeLagrange GuillaumeLagrange Jan 14, 2026

Choose a reason for hiding this comment

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

As discussed, I added a small subset of commands to run with the exec-harness. For now, script-like multi-commands are kinda out of scope, we'll see if we get user demand.

Kept the integration tests in the exec-harness, we'll see if we need more integration tests with pipes and whatnot form the codspeed runner

@GuillaumeLagrange GuillaumeLagrange removed the request for review from adriencaccia January 14, 2026 14:05
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1815-add-the-command-that-was-run-to-the-upload-payload-and branch 2 times, most recently from 6e42e0f to 7b1c4ca Compare January 14, 2026 14:23
Currently, the codspeed rust core library automatically sends the
integration metadata message to the runner.

This will be changed later, but in the meantime, remove the second call.
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1815-add-the-command-that-was-run-to-the-upload-payload-and branch from 7b1c4ca to 7a24f1d Compare January 14, 2026 16:10
Copy link
Member

@not-matthias not-matthias left a comment

Choose a reason for hiding this comment

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

LGTM!

@GuillaumeLagrange GuillaumeLagrange merged commit 1ac1eae into main Jan 14, 2026
18 checks passed
@GuillaumeLagrange GuillaumeLagrange deleted the cod-1815-add-the-command-that-was-run-to-the-upload-payload-and branch January 14, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants