From eeb89f030f42f37b79646f18a1474410e2fdc9cc Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Sun, 2 Jun 2019 06:44:21 +0000 Subject: [PATCH] Use workspace in examples --- examples/Cargo.toml | 9 +++++++++ examples/test.sh | 21 +++++++-------------- 2 files changed, 16 insertions(+), 14 deletions(-) create mode 100644 examples/Cargo.toml diff --git a/examples/Cargo.toml b/examples/Cargo.toml new file mode 100644 index 0000000..be26faa --- /dev/null +++ b/examples/Cargo.toml @@ -0,0 +1,9 @@ +[workspace] +members = [ + "coroutines", + "dynamic_threads", + "free_by_borrow", + "free_by_gc", + "static_threads", + "suspended_coroutines", +] diff --git a/examples/test.sh b/examples/test.sh index 2c9dc5c..8be627e 100755 --- a/examples/test.sh +++ b/examples/test.sh @@ -2,19 +2,12 @@ set -ex -for dir in $(ls) -do - if ! [ -d $dir ] - then - continue - fi +cargo build - ( - cd $dir - cargo build - target/debug/$dir & - pid=$! - sleep 10 - kill $pid - ) +for cargo_file in */Cargo.toml +do + target/debug/$(dirname $cargo_file) & + pid=$! + sleep 10 + kill $pid done