-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: compiling tests without executing them (#13)
Co-authored-by: Oleksandr Zarudnyi <[email protected]>
- Loading branch information
1 parent
bf43c6f
commit 7c85964
Showing
5 changed files
with
54 additions
and
4 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
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,28 @@ | ||
//! | ||
//! The compiler tester workflows. | ||
//! | ||
use std::str::FromStr; | ||
|
||
/// | ||
/// Describes sets of actions that compiler tester is able to perform. | ||
/// | ||
#[derive(Debug)] | ||
pub enum Workflow { | ||
/// Only build tests but not execute them. | ||
BuildOnly, | ||
/// Build and execute tests. | ||
BuildAndRun, | ||
} | ||
|
||
impl FromStr for Workflow { | ||
type Err = &'static str; | ||
|
||
fn from_str(day: &str) -> Result<Self, Self::Err> { | ||
match day { | ||
"build" => Ok(Workflow::BuildOnly), | ||
"run" => Ok(Workflow::BuildAndRun), | ||
_ => Err("Could not parse workflow. Supported workflows: build, run."), | ||
} | ||
} | ||
} |
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