Files
test-repo/tests/meson.build
Alexis Engelke ed53b4a54d Support 32 bit and 64 bit decoding with one binary
It is possible to configure the build process such that decoding of 32
bit and 64 bit instructions can be chosen at runtime using an additional
parameter of the decode function. The header file is now entirely
architecture-independent and no longer required any previous defines.

Decoding x86-64 still requires a 64-bit pointer size.
2019-01-13 11:58:59 +01:00

43 lines
930 B
Meson

test_driver = executable('test_driver', 'driver.c',
dependencies: libx86decode,
c_args: ['-D_GNU_SOURCE'])
test_args = [files('test.py'), test_driver]
if decode_32
test_args += ['--32']
endif
if decode_64
test_args += ['--64']
endif
## Test cases
testcases = [
['enter', 'decode-enter.sh'],
['imul', 'decode-imul.sh'],
['inc', 'decode-inc.sh'],
['movsx', 'decode-movsx.sh'],
['ret', 'decode-ret.sh'],
['sse-shufpd', 'decode-sse-shufpd.sh'],
['sse-movq', 'decode-sse-movq.sh'],
]
foreach case : testcases
test(case[0], python3, args: test_args + files(case[1]))
endforeach
## Benchmarks
#
# Note that we don't use meson's benchmark function here, because it doesn't
# give us the output we need by default.
benchmarks = [
'benchmarks.txt',
]
run_target('benchmark_decode',
command: [python3, test_args, '--benchmark', files(benchmarks)])