Commit 82597c46 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜 Committed by Marge Bot
Browse files

pan/bit: Add mode to run unit tests



Probably the most useful of the bunch going forward.
Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <mesa/mesa!4458>
Part-of: <mesa/mesa!4458>
parent 1a1c5570
......@@ -123,6 +123,16 @@ test_vertex(char **argv)
BIT_DEBUG_ALL);
}
static void
tests(void)
{
void *memctx = NULL; /* TODO */
struct panfrost_device *dev = bit_initialize(memctx);
bit_fmod(dev, BIT_DEBUG_FAIL);
bit_fma(dev, BIT_DEBUG_FAIL);
bit_csel(dev, BIT_DEBUG_FAIL);
}
static void
run(const char *filename)
{
......@@ -169,6 +179,8 @@ main(int argc, char **argv)
disassemble(argv[2], false);
else if (strcmp(argv[1], "disasm-verbose") == 0)
disassemble(argv[2], true);
else if (strcmp(argv[1], "tests") == 0)
tests();
else if (strcmp(argv[1], "test-vertex") == 0)
test_vertex(&argv[2]);
else if (strcmp(argv[1], "run") == 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment