-
Notifications
You must be signed in to change notification settings - Fork 283
misc: add pytests.nix
dev utility
#5501
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# This is for development convenience, to make setting up and running pytests straightforward. | ||
# This is not a final product, so feel free to edit manually to adjust tests running or do whatever is convenient | ||
# for you right now. | ||
# | ||
# Build binaries: `cargo build --release --bins` | ||
# Run from the repo root: `nix-shell ./scripts/pytests.nix` | ||
# That's it | ||
with import <nixpkgs> {}; | ||
pkgs.mkShell { | ||
buildInputs = [ | ||
poetry | ||
python313Packages.tomli-w | ||
|
||
cowsay | ||
]; | ||
|
||
BIN_IROHAD = "target/release/irohad"; | ||
BIN_IROHA = "target/release/iroha"; | ||
BIN_KAGAMI = "target/release/kagami"; | ||
Comment on lines
+17
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What’s the rationale for switching to release builds? Is it to align with integration tests that use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, debug builds would totally suffice. I made it to align with the integration tests. Which aren't, btw, using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be helpful to update the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created: #5505 |
||
|
||
TMP_DIR = "../../test"; | ||
IROHA_CLI_BINARY = "iroha"; | ||
IROHA_CLI_CONFIG = "client.toml"; | ||
|
||
shellHook = '' | ||
./scripts/test_env.py setup | ||
echo "Set up test env" | ||
|
||
cd pytests/iroha_cli_tests | ||
poetry install --no-root | ||
poetry run pytest | ||
|
||
cd ../iroha_torii_tests | ||
poetry install --no-root | ||
poetry run pytest | ||
|
||
cd ../../ | ||
|
||
./scripts/test_env.py cleanup | ||
echo "Cleaned up" | ||
|
||
cowsay "Done!" | ||
exit | ||
''; | ||
} |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the guide in the
pytest/*
folder be updated?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mentioned, intentionally with minimal effort
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And opened #5504