Add some small benchmarks
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
|
||||
cases = [
|
||||
test_driver = executable('test_driver', 'driver.c',
|
||||
dependencies: libx86decode,
|
||||
c_args: ['-D_GNU_SOURCE'])
|
||||
test_args = [files('test.py'), test_driver, archmode]
|
||||
|
||||
|
||||
## Test cases
|
||||
|
||||
testcases = [
|
||||
['enter', 'decode-enter.sh'],
|
||||
['imul', 'decode-imul.sh'],
|
||||
['inc', 'decode-inc.sh'],
|
||||
@@ -10,11 +18,19 @@ cases = [
|
||||
['sse-movq', 'decode-sse-movq.sh'],
|
||||
]
|
||||
|
||||
test_driver = executable('test_driver', 'driver.c',
|
||||
dependencies: libx86decode,
|
||||
c_args: ['-D_GNU_SOURCE'])
|
||||
test_args = files('test.py') + [test_driver.full_path(), get_option('archmode')]
|
||||
|
||||
foreach case : cases
|
||||
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)])
|
||||
|
||||
Reference in New Issue
Block a user