Skip to content

Conversation

@misiugodfrey
Copy link
Contributor

@misiugodfrey misiugodfrey commented Nov 5, 2025

Experimented with adding some script testing with pytest and bats to make changing our scripts easier, as I would like to enable some larger-scale refactors. Would welcome feedback on if we should take this direction further.

This specifically aims to test the scripts that are not tested by the current CI (datagen, schema-setup, etc...).

Not sure if we want to add a dependency on bats (needed to run the script testing) or just leave that up to users.

echo "Error: PRESTO_DATA_DIR must be set to the directory path that contains the benchmark data directories"
print_help
exit 1
echo_error "Error: PRESTO_DATA_DIR must be set to the directory path that contains the benchmark data directories"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

An earlier version of these tests was relying on errors being reported to stderr to avoid displaying stdout. I would like to proliferate these kinds of changes, but will leave it here until tests to through.

# limitations under the License.

# --- Print error messages in red ---
function echo_error() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the kind of common code outlining I would like to do on a larger scale, but would like the tests in place before committing to larger changes.

@simoneves
Copy link
Contributor

This is a bit of a leap for my brain. I'll look again when I'm fresh. TIL: bats

@misiugodfrey
Copy link
Contributor Author

@coderabbitai review

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