tests: Move benchmarks into a separate folder

Make it clear that these files are related to benchmarks by moving
them into a new folder called "bench".

Message-Id: <20210312092238.79509-1-thuth@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
Thomas Huth 2021-03-12 10:22:38 +01:00
parent da668aa15b
commit 3b472e71d5
9 changed files with 36 additions and 34 deletions

View file

@ -2722,7 +2722,7 @@ F: crypto/
F: include/crypto/
F: qapi/crypto.json
F: tests/unit/test-crypto-*
F: tests/benchmark-crypto-*
F: tests/bench/benchmark-crypto-*
F: tests/unit/crypto-tls-*
F: tests/unit/pkix_asn1_tab.c
F: qemu.sasl

34
tests/bench/meson.build Normal file
View file

@ -0,0 +1,34 @@
qht_bench = executable('qht-bench',
sources: 'qht-bench.c',
dependencies: [qemuutil])
executable('atomic_add-bench',
sources: files('atomic_add-bench.c'),
dependencies: [qemuutil],
build_by_default: false)
executable('atomic64-bench',
sources: files('atomic64-bench.c'),
dependencies: [qemuutil],
build_by_default: false)
benchs = {}
if have_block
benchs += {
'benchmark-crypto-hash': [crypto],
'benchmark-crypto-hmac': [crypto],
'benchmark-crypto-cipher': [crypto],
}
endif
foreach bench_name, deps: benchs
exe = executable(bench_name, bench_name + '.c',
dependencies: [qemuutil] + deps)
benchmark(bench_name, exe,
args: ['--tap', '-k'],
protocol: 'tap',
timeout: 0,
suite: ['speed'])
endforeach

View file

@ -1,18 +1,6 @@
py3 = import('python').find_installation()
qht_bench = executable('qht-bench',
sources: 'qht-bench.c',
dependencies: [qemuutil])
executable('atomic_add-bench',
sources: files('atomic_add-bench.c'),
dependencies: [qemuutil],
build_by_default: false)
executable('atomic64-bench',
sources: files('atomic64-bench.c'),
dependencies: [qemuutil],
build_by_default: false)
subdir('bench')
test_qapi_outputs = [
'qapi-builtin-types.c',
@ -73,26 +61,6 @@ test_deps = {
'test-qht-par': qht_bench,
}
benchs = {}
if have_block
benchs += {
'benchmark-crypto-hash': [crypto],
'benchmark-crypto-hmac': [crypto],
'benchmark-crypto-cipher': [crypto],
}
endif
foreach bench_name, deps: benchs
exe = executable(bench_name, bench_name + '.c',
dependencies: [qemuutil] + deps)
benchmark(bench_name, exe,
args: ['--tap', '-k'],
protocol: 'tap',
timeout: 0,
suite: ['speed'])
endforeach
if have_tools and 'CONFIG_VHOST_USER' in config_host and 'CONFIG_LINUX' in config_host
executable('vhost-user-bridge',
sources: files('vhost-user-bridge.c'),