Skip to content

Commit d74fb9b

Browse files
Omit broken tests from verification
1 parent c44594f commit d74fb9b

File tree

5 files changed

+27
-8
lines changed

5 files changed

+27
-8
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tfb_toolset"
3-
version = "0.4.3"
3+
version = "0.4.4"
44
authors = ["Mike Smith", "Nate Brady"]
55
edition = "2018"
66

src/io.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ mod tests {
323323
use crate::io::print_all_frameworks;
324324
use crate::io::print_all_tests;
325325
use crate::io::print_all_tests_with_tag;
326+
use crate::metadata::TAG_BROKEN;
326327

327328
#[test]
328329
fn it_will_get_a_valid_tfb_dir() {
@@ -350,7 +351,7 @@ mod tests {
350351

351352
#[test]
352353
fn it_can_print_all_tests_with_tag() {
353-
match print_all_tests_with_tag("broken") {
354+
match print_all_tests_with_tag(TAG_BROKEN) {
354355
Ok(_) => {}
355356
Err(e) => panic!("io::print_all_tests_with_tag failed. error: {:?}", e),
356357
};

src/metadata.rs

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ use clap::ArgMatches;
1010
use glob::glob;
1111
use std::path::PathBuf;
1212

13+
pub const TAG_BROKEN: &str = "broken";
14+
1315
/// Walks the FrameworkBenchmarks directory's `framework` sub-dir to find all
1416
/// test implementations' `config.toml`, parse each file, and pushes the top-
1517
/// level `framework` to the return Vec.
@@ -129,8 +131,16 @@ pub fn list_projects_by_language_name(
129131
let language = config::get_language_by_config_file(&framework, &path_buf)?;
130132
if language_name.to_lowercase() == language.to_lowercase() {
131133
for mut test in config::get_test_implementations_by_config_file(&path_buf)? {
132-
test.specify_test_type(test_type);
133-
tests.push(test);
134+
if test.tags.is_none()
135+
|| !test
136+
.tags
137+
.as_ref()
138+
.unwrap()
139+
.contains(&TAG_BROKEN.to_string())
140+
{
141+
test.specify_test_type(test_type);
142+
tests.push(test);
143+
}
134144
}
135145
if !tests.is_empty() {
136146
projects.push(Project {
@@ -164,8 +174,16 @@ pub fn list_projects_by_dir_name(
164174
let mut tests = Vec::new();
165175
let language = config::get_language_by_config_file(&framework, &path_buf)?;
166176
for mut test in config::get_test_implementations_by_config_file(&path_buf)? {
167-
test.specify_test_type(test_type);
168-
tests.push(test);
177+
if test.tags.is_none()
178+
|| !test
179+
.tags
180+
.as_ref()
181+
.unwrap()
182+
.contains(&TAG_BROKEN.to_string())
183+
{
184+
test.specify_test_type(test_type);
185+
tests.push(test);
186+
}
169187
}
170188
if !tests.is_empty() {
171189
projects.push(Project {

src/options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub mod network_modes {
4747
/// Parses all the arguments from the CLI and returns the configured matches.
4848
pub fn parse<'app>() -> App<'app> {
4949
App::new("tfb_toolset")
50-
.version("0.1.0")
50+
.version("0.4.4")
5151
.author("Mike Smith <[email protected]>")
5252
.about("The toolset for the TechEmpower Framework Benchmarks.")
5353
// Suite options

0 commit comments

Comments
 (0)