From b2cccd019c501842cc2c9cd9ca649e0a75f4aa27 Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Wed, 4 Nov 2020 08:51:19 -0500 Subject: [PATCH] tests: add a tox target to run benchmarks Run benchmark with default settings: tox -e benchmark Run benchmark with specified number of hosts or tasks: tox -e benchmark -- -e benchmark_host_count=50 Change-Id: I295967c6fb39ec5e02a80b863bde4c57fc6f2139 --- tox.ini | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tox.ini b/tox.ini index 94f7935a..644f633c 100644 --- a/tox.ini +++ b/tox.ini @@ -49,6 +49,18 @@ commands = {toxinidir}/tests/basic.yaml \ -e ara_api_root_dir={envtmpdir}/.ara {posargs} +[testenv:benchmark] +deps = ansible +commands = + ansible-playbook -i localhost, --connection=local \ + {toxinidir}/tests/integration/benchmark.yaml {posargs} +setenv = + ANSIBLE_CALLBACK_PLUGINS={toxinidir}/ara/plugins/callback + ANSIBLE_ACTION_PLUGINS={toxinidir}/ara/plugins/action + ANSIBLE_LOOKUP_PLUGINS={toxinidir}/ara/plugins/lookup + ARA_API_CLIENT={env:ARA_API_CLIENT:offline} + ARA_API_SERVER={env:ARA_API_SERVER:"http://127.0.0.1:8000"} + [testenv:cover] commands = coverage erase