about summary refs log tree commit diff
path: root/library/stdarch/crates/intrinsic-test/src/main.rs
blob: 1234e2b55833017f76e9cd1bb5221b7e25d00ad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#![feature(slice_partition_dedup)]
#[macro_use]
extern crate log;

mod arm;
mod common;

use arm::ArmTestProcessor;
use common::SupportedArchitectureTest;
use common::types::{Cli, ProcessedCli};

fn main() {
    pretty_env_logger::init();
    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);

    if !test_environment.build_c_file() {
        std::process::exit(2);
    }
    if !test_environment.build_rust_file() {
        std::process::exit(3);
    }
    if !test_environment.compare_outputs() {
        std::process::exit(1);
    }
}