xmake-tests

Installation
SKILL.md

Xmake Tests

Xmake has built-in test support via add_tests on a target. xmake test builds and runs all declared test cases.

Basic test on an executable

target("app_test")
    set_kind("binary")
    add_files("tests/*.cpp", "src/lib/*.cpp")
    add_tests("default")                                     -- run the binary with no args
    add_tests("with_arg", {runargs = {"--quick"}})
    add_tests("expect_zero", {trim_output = true, pass_outputs = "OK"})
    add_tests("fail_case",  {fail_outputs = {"ERROR", "FATAL"}})

Running:

Installs
5
GitHub Stars
16
First Seen
Apr 29, 2026
xmake-tests — xmake-io/xmake-skills