freedreno: Move afuc tests to meson unit tests.
Now they run automatically in parallel with other unit testing, rather than needing a separate script and environment to run them. Instead of doing shell script filtering afterwards, I just added a little flag to suppress printing the path name. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6360>
This commit is contained in:
parent
7438ea55c4
commit
5209a0ae16
|
@ -53,6 +53,3 @@ $cffdump --frame 0 --once $traces/dEQP-VK.draw.indirect_draw.indexed.indirect_dr
|
|||
$cffdump --script $base/decode/scripts/parse-submits.lua $traces/shadow.rd.gz | filter $output/shadow.log
|
||||
|
||||
$crashdec -sf $traces/crash.devcore | filter $output/crash.log
|
||||
|
||||
$asm -g 6 $traces/afuc_test.asm $output/afuc_test.fw
|
||||
$disasm -g 630 $reference/afuc_test.fw | filter $output/afuc_test.asm
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
; a6xx microcode
|
||||
; Disassembling microcode: src/freedreno/.gitlab-ci/reference/afuc_test.fw
|
||||
; Version: 01000001
|
||||
|
||||
[01000001] ; nop
|
||||
|
|
|
@ -893,9 +893,10 @@ main(int argc, char **argv)
|
|||
uint32_t gpu_id = 0;
|
||||
size_t sz;
|
||||
int c, ret;
|
||||
bool unit_test = false;
|
||||
|
||||
/* Argument parsing: */
|
||||
while ((c = getopt(argc, argv, "g:vce")) != -1) {
|
||||
while ((c = getopt(argc, argv, "g:vceu")) != -1) {
|
||||
switch (c) {
|
||||
case 'g':
|
||||
gpu_id = atoi(optarg);
|
||||
|
@ -910,6 +911,9 @@ main(int argc, char **argv)
|
|||
emulator = true;
|
||||
verbose = true;
|
||||
break;
|
||||
case 'u':
|
||||
unit_test = true;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
|
@ -956,7 +960,8 @@ main(int argc, char **argv)
|
|||
|
||||
buf = (uint32_t *)os_read_file(file, &sz);
|
||||
|
||||
printf("; Disassembling microcode: %s\n", file);
|
||||
if (!unit_test)
|
||||
printf("; Disassembling microcode: %s\n", file);
|
||||
printf("; Version: %08x\n\n", buf[1]);
|
||||
|
||||
if (gpuver < 6) {
|
||||
|
|
|
@ -83,3 +83,30 @@ disasm = executable(
|
|||
build_by_default : with_tools.contains('freedreno'),
|
||||
install: install_fd_decode_tools,
|
||||
)
|
||||
|
||||
if with_tests
|
||||
diff = find_program('diff')
|
||||
|
||||
disasm_fw = custom_target('afuc_test.asm',
|
||||
output: 'afuc_test.asm',
|
||||
command: [disasm, '-u', files('../.gitlab-ci/reference/afuc_test.fw'), '-g', '630'],
|
||||
capture: true
|
||||
)
|
||||
test('afuc-disasm',
|
||||
diff,
|
||||
args: ['-u', files('../.gitlab-ci/reference/afuc_test.asm'), disasm_fw],
|
||||
suite: 'freedreno',
|
||||
workdir: meson.source_root()
|
||||
)
|
||||
|
||||
asm_fw = custom_target('afuc_test.fw',
|
||||
output: 'afuc_test.fw',
|
||||
command: [asm, '-g', '6', files('../.gitlab-ci/traces/afuc_test.asm'), '@OUTPUT@'],
|
||||
)
|
||||
test('afuc-asm',
|
||||
diff,
|
||||
args: ['-u', files('../.gitlab-ci/reference/afuc_test.fw'), asm_fw],
|
||||
suite: 'freedreno',
|
||||
workdir: meson.source_root()
|
||||
)
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue