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

xtask: sovereign binaries execution #227

Open
gabriele-0201 opened this issue Feb 9, 2024 · 0 comments
Open

xtask: sovereign binaries execution #227

gabriele-0201 opened this issue Feb 9, 2024 · 0 comments

Comments

@gabriele-0201
Copy link
Contributor

Duct does a weird thing with dir. You can find more information about it here: docs.rs/duct/latest/duct/struct.Expression.html#method.dir and the following code snippet does not work:

let sovereign_rollup_handle = cmd!("../target/release/sov-demo-rollup")
   .dir("demo/sovereign/demo-rollup/")
   .run()?;

To solve this issue, you can change the references to the folder demo/sovereign/test-data. Currently, the sov-demo-rollup and sov-cli binaries expect to be executed from the folder demo/sovereign/demo-rollup, and every reference to test-data is ../test-data. We could modify it to be executed from the main directory of the project, so that all relative paths to test-data will be demo/sovereign/test-data, and there won't be conflicts with how relative paths are handled by duct::dir.

Here's how it could look like if we make such change:

let sovereign_rollup_handle = cmd!("demo/sovereign/target/release/sov-demo-rollup").run()?;

the test function would then be

let cli = "demo/sovereign/target/release/sov-cli";
let test_data_path = "demo/sovereign/test-data/";
let run_cli_cmd = |args: &str| duct::cmd(cli, args.split(' ')).run();

As you can see, there would no longer be a need to execute sh commands with duct

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

No branches or pull requests

1 participant