Skip to content

Commit

Permalink
Merge pull request #278 from kinode-dao/hf/run-tests-improvements
Browse files Browse the repository at this point in the history
`run-tests`:  improvements
  • Loading branch information
nick1udwig authored Dec 28, 2024
2 parents 47cdf82 + 643fde5 commit d15ab57
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kit"
version = "0.8.5"
version = "0.9.0"
edition = "2021"

[build-dependencies]
Expand Down
1 change: 1 addition & 0 deletions src/new/templates/javascript/no-ui/chat/test/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ runtime = { FetchVersion = "latest" }
# runtime = { RepoPath = "~/git/kinode" }
persist_home = false
runtime_build_release = false
always_print_node_output = false


[[tests]]
Expand Down
2 changes: 1 addition & 1 deletion src/new/templates/javascript/no-ui/echo/test/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ runtime = { FetchVersion = "latest" }
# runtime = { RepoPath = "~/git/kinode" }
persist_home = false
runtime_build_release = false

always_print_node_output = false

[[tests]]
dependency_package_paths = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ runtime = { FetchVersion = "latest" }
# runtime = { RepoPath = "~/git/kinode" }
persist_home = false
runtime_build_release = false
always_print_node_output = false


[[tests]]
Expand Down
1 change: 1 addition & 0 deletions src/new/templates/python/no-ui/chat/test/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ runtime = { FetchVersion = "latest" }
# runtime = { RepoPath = "~/git/kinode" }
persist_home = false
runtime_build_release = false
always_print_node_output = false


[[tests]]
Expand Down
1 change: 1 addition & 0 deletions src/new/templates/python/no-ui/echo/test/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ runtime = { FetchVersion = "latest" }
# runtime = { RepoPath = "~/git/kinode" }
persist_home = false
runtime_build_release = false
always_print_node_output = false


[[tests]]
Expand Down
1 change: 1 addition & 0 deletions src/new/templates/python/no-ui/fibonacci/test/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ runtime = { FetchVersion = "latest" }
# runtime = { RepoPath = "~/git/kinode" }
persist_home = false
runtime_build_release = false
always_print_node_output = false


[[tests]]
Expand Down
1 change: 1 addition & 0 deletions src/new/templates/rust/no-ui/chat/test/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ runtime = { FetchVersion = "latest" }
# runtime = { RepoPath = "~/git/kinode" }
persist_home = false
runtime_build_release = false
always_print_node_output = false


[[tests]]
Expand Down
1 change: 1 addition & 0 deletions src/new/templates/rust/no-ui/echo/test/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ runtime = { FetchVersion = "latest" }
# runtime = { RepoPath = "~/git/kinode" }
persist_home = false
runtime_build_release = false
always_print_node_output = false


[[tests]]
Expand Down
1 change: 1 addition & 0 deletions src/new/templates/rust/no-ui/fibonacci/test/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ runtime = { FetchVersion = "latest" }
# runtime = { RepoPath = "~/git/kinode" }
persist_home = false
runtime_build_release = false
always_print_node_output = false


[[tests]]
Expand Down
1 change: 1 addition & 0 deletions src/new/templates/rust/no-ui/file-transfer/test/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ runtime = { FetchVersion = "latest" }
# runtime = { RepoPath = "~/git/kinode" }
persist_home = false
runtime_build_release = false
always_print_node_output = false


[[tests]]
Expand Down
1 change: 1 addition & 0 deletions src/new/templates/rust/ui/chat/test/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ runtime = { FetchVersion = "latest" }
# runtime = { RepoPath = "~/git/kinode" }
persist_home = false
runtime_build_release = false
always_print_node_output = false


[[tests]]
Expand Down
4 changes: 3 additions & 1 deletion src/run_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ async fn handle_test(
test: Test,
test_dir_path: &Path,
persist_home: bool,
always_print_node_output: bool,
) -> Result<()> {
let (setup_packages, test_package_paths) = build_packages(
&test,
Expand Down Expand Up @@ -801,7 +802,7 @@ async fn handle_test(
info!("PASS");
}

let _ = send_to_cleanup.send(tests_result.is_err());
let _ = send_to_cleanup.send(always_print_node_output || tests_result.is_err());
for handle in task_handles {
handle.await.unwrap();
}
Expand Down Expand Up @@ -872,6 +873,7 @@ pub async fn execute(config_path: PathBuf) -> Result<()> {
test,
&test_dir_path,
config.persist_home,
config.always_print_node_output,
)
.await?;
}
Expand Down
1 change: 1 addition & 0 deletions src/run_tests/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub struct Config {
pub runtime: Runtime,
pub runtime_build_release: bool,
pub persist_home: bool,
pub always_print_node_output: bool,
pub tests: Vec<Test>,
}

Expand Down

0 comments on commit d15ab57

Please sign in to comment.