chore: added match block in src/main.rs

This commit is contained in:
Madhav Madhusoodanan 2025-03-27 23:19:23 +04:00 committed by Amanieu d'Antras
parent c862432cfd
commit ca67119d5f

View file

@ -14,8 +14,19 @@ fn main() {
let args: Cli = clap::Parser::parse();
let processed_cli_options = ProcessedCli::new(args);
// TODO: put this in a match block to support more architectures
let test_environment = ArmTestProcessor::create(processed_cli_options);
let test_environment_result = match processed_cli_options.target.as_str() {
"aarch64-unknown-linux-gnu"
| "armv7-unknown-linux-gnueabihf"
| "aarch64_be-unknown-linux-gnu" => Some(ArmTestProcessor::create(processed_cli_options)),
_ => None,
};
if test_environment_result.is_none() {
std::process::exit(0);
}
let test_environment = test_environment_result.unwrap();
if !test_environment.build_c_file() {
std::process::exit(2);