forked from bazelbuild/rules_rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor CI and test cleanup (bazelbuild#2004)
- Loading branch information
1 parent
e2beebb
commit 4074e6b
Showing
6 changed files
with
44 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +0,0 @@ | ||
load( | ||
"@bazel_tools//tools/build_rules:test_rules.bzl", | ||
"rule_test", | ||
) | ||
|
||
rule_test( | ||
name = "hello_lib_rule_test", | ||
generates = ["libhello_lib-683707109.rlib"], | ||
rule = "//test/rust:hello_lib", | ||
) | ||
|
||
rule_test( | ||
name = "hello_world_rule_test", | ||
generates = select({ | ||
"//rust/platform:windows": ["hello_world.exe"], | ||
"//conditions:default": ["hello_world"], | ||
}), | ||
rule = "//test/rust:hello_world", | ||
) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use std::process; | ||
|
||
fn main() { | ||
let binary = std::env::args().nth(1).expect("No argument was provided"); | ||
|
||
let output = process::Command::new(binary) | ||
.output() | ||
.expect("Failed to spawn process"); | ||
if !output.status.success() { | ||
eprintln!("Failed to execute binary"); | ||
eprintln!("{}", std::str::from_utf8(&output.stdout).unwrap()); | ||
eprintln!("{}", std::str::from_utf8(&output.stderr).unwrap()); | ||
process::exit(output.status.code().unwrap()); | ||
} | ||
|
||
let stdout = std::str::from_utf8(&output.stdout).unwrap().trim(); | ||
assert_eq!("Howdy from version 1.2.3", stdout); | ||
} |
This file was deleted.
Oops, something went wrong.