Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/sources/test/resources/reference/tests/BUILD.kts
blob: 7e8d1e2c7a6b4111dbf2fb03d9ba3e7b8ac885d6 (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
30
31
32
33
34
35
36
// The tests/BUILD.kts of the reference module.
cpp.test("unit") {
    sources(glob("*_test.cpp"))
    depends("//core/:core", "@catch3//:main")   // the framework is a dependency
    data(glob("fixtures/*"))

    args("--reporter", "compact")
    env("LANG" to "C", "TZ" to "UTC")
    size = TestSize.SMALL                    // SMALL, MEDIUM, LARGE, ENORMOUS; default: MEDIUM
    timeout = 2.minutes                      // default: from size (1m, 5m, 15m, 60m)
    flaky = false                            // true: a failure is retried up to 3 times
    shards = 4                               // TEST_TOTAL_SHARDS / TEST_SHARD_INDEX; default: 1
    tags(TestTag.MANUAL, TestTag.EXCLUSIVE)  // MANUAL, EXCLUSIVE, LOCAL, NO_CACHE

    compiler = Compiler.CLANG                // every build setting of a bin
    standard = CppStandard.CPP23
    defines("TESTING=1")
    linkStatic = true                        // default: true for tests
    if (BUILD_MODE == BuildMode.DEBUG) sanitize(Sanitizer.ADDRESS, Sanitizer.UNDEFINED)
}

c.test("core-c") {
    sources("core_test.c")
    depends("//core/:core")
}

objc.test("mac") {
    sources(glob("mac/*_test.m"))
    depends("//mac/:bridge")
    targetTriple("aarch64-apple-darwin")
    frameworks("XCTest")
}

zig.test("tool") {
    sources("../tools/main.zig")             // runs with zig test
}