litnik 0.2.1

An embedded Lit and FileCheck runner for compiler test suites.
Documentation

litnik

crates.io docs.rs CI

Lit and FileCheck for Cargo test targets.

Get started

[dev-dependencies]
litnik = "0.2"

[[test]]
name = "lit"
path = "tests/lit.rs"
harness = false
fn main() {
    litnik::Suite::new(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/lit"))
        .suffix("mlir")
        .tool("example-opt", env!("CARGO_BIN_EXE_example-opt"))
        .exec_root(env!("CARGO_TARGET_TMPDIR"))
        .feature("example-target")
        .run_from_args();
}
// RUN: example-opt %s | FileCheck %s
// REQUIRES: example-target

// CHECK-LABEL: func.func @fold_me
// CHECK: arith.constant 42
cargo test --test lit

Documentation

License

Licensed under either the Apache License, Version 2.0 or the MIT license, at your option.