Skip to content

Commit

Permalink
Fix Broken smoke-test.sh (#82)
Browse files Browse the repository at this point in the history
* Run blaze build commands independently so that 'set -e' properly fails

* Fix spooky breakages
  • Loading branch information
acmcarther committed Jan 10, 2019
1 parent 8a75aa0 commit 1271536
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions smoke-test.sh
Expand Up @@ -23,13 +23,18 @@ command_exists "bazel"
rm -rf "$EXAMPLES_DIR/remote" "$EXAMPLES_DIR/vendored"
cp -r "$TEST_DIR/remote" "$TEST_DIR/vendored" "$EXAMPLES_DIR"

# Set up root BUILD file
touch "$EXAMPLES_DIR/BUILD"

# Set up the new WORKSPACE file
cat > "$EXAMPLES_DIR/WORKSPACE" << EOF
workspace(name = "io_bazel_rules_rust")
workspace(name = "examples")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
name = "io_bazel_rules_rust",
commit = "f32695dcd02d9a19e42b9eb7f29a24a8ceb2b858",
commit = "5894d35bb7b5f982478dfbf71bc411426fae3451",
remote = "https://github.com/bazelbuild/rules_rust.git",
)
Expand Down Expand Up @@ -83,7 +88,8 @@ for ex in $(find $EXAMPLES_DIR -mindepth 2 -maxdepth 2 -type d); do
bazel_cargo_path="//$ex_type/$ex_name/cargo:all"

echo "Running Bazel build for $bazel_path, $bazel_cargo_path"
bazel build "$bazel_path" && bazel build "$bazel_cargo_path"
bazel build "$bazel_path"
bazel build "$bazel_cargo_path"
done

cd "$PWD"
2 changes: 1 addition & 1 deletion smoke_test/vendored/non_cratesio_library/cargo/Cargo.toml
Expand Up @@ -5,7 +5,7 @@ authors = ["Bradlee Speice <bradlee.speice@gmail.com>"]

[dependencies]

futures = { git = "https://github.com/rust-lang-nursery/futures-rs.git", tag = "0.1.19" }
futures = { git = "https://github.com/rust-lang-nursery/futures-rs.git", tag = "0.2.0" }
env_logger = { git = "https://github.com/sebasmagri/env_logger.git", tag = "v0.5.5" }
# Note that we use a (slightly) outdated version of log; because env_logger resolves a version
# of `log` from crates.io that may clash with the resolution here, we need to force
Expand Down

0 comments on commit 1271536

Please sign in to comment.