Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: run system commands #193

Merged
merged 9 commits into from
Sep 15, 2023

Conversation

BugenZhao
Copy link
Collaborator

@BugenZhao BugenZhao commented Sep 14, 2023

Support running system commands in slt files.

system ok
echo "hello, world" > __TEST_DIR__/a.txt

Signed-off-by: Bugen Zhao [email protected]

Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Comment on lines +125 to 135
fn engine_name(&self) -> &str {
dispatch_engines!(self, e, { e.engine_name() })
}

async fn sleep(dur: Duration) {
tokio::time::sleep(dur).await
}

async fn run_command(command: std::process::Command) -> std::io::Result<ExitStatus> {
Command::from(command).status().await
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a breaking api change. Is it possible to make them default methods?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It does have default implementations. However, new variants in RecordOutput and TestErrorKind still break the API. I guess we have to bump the major version.

Copy link
Member

@wangrunji0408 wangrunji0408 left a comment

Choose a reason for hiding this comment

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

LGTM!

Signed-off-by: Bugen Zhao <[email protected]>
@BugenZhao
Copy link
Collaborator Author

Bump the version to v0.16.0 and also include the change log from #194.

@xxchan xxchan merged commit d554415 into risinglightdb:main Sep 15, 2023
4 checks passed
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.

4 participants