From a97c4212aa4354ff44e274f1a26495a43766c035 Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Sun, 9 Jul 2017 19:11:55 +0530 Subject: [PATCH] Make test_regex simpler for tempest Earlier we are using complex regex '\[.*\b{{ test_regex }}\b.*\]' to run test in validate-tempest role which appears to be confusing and it does not excepts other tests. So i have modified it to make more simpler by keep '(test_regex)' in that. ostestr will easy handle it. Change-Id: I0287ee7a19fca0298d9b934adde1a3112615cef3 --- roles/validate-tempest/README.md | 2 +- roles/validate-tempest/templates/run-tempest.sh.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/validate-tempest/README.md b/roles/validate-tempest/README.md index 9c45cfcbc..9bfe2c49c 100644 --- a/roles/validate-tempest/README.md +++ b/roles/validate-tempest/README.md @@ -17,7 +17,7 @@ Role Variables * `tempest_format`: venv/packages - Which tempest installation to use - either install python virtual environment with installed there python modules from requirements file, or to use installed with RDO RPM packages * `tempest_log_file` - name of log file for tempest run -* `test_regex` - tests regular expression for testr run, i.e. smoke +* `test_regex` - tests regular expression for testr run, i.e. smoke or tempest.api.object_storage|keystone_tempest_plugin. * `run_tempest`: false/true - to run tempest or not * `skip_file_src`: path to skip tests file, set it empty if running without skip list: `skip_file_src=''` * `tempest_workers`: int - how many parallel workers to run (default is number of cores) diff --git a/roles/validate-tempest/templates/run-tempest.sh.j2 b/roles/validate-tempest/templates/run-tempest.sh.j2 index d3a82bb4a..73ef76e0c 100644 --- a/roles/validate-tempest/templates/run-tempest.sh.j2 +++ b/roles/validate-tempest/templates/run-tempest.sh.j2 @@ -26,7 +26,7 @@ ostestr -l ## List tempest plugins $TEMPESTCLI list-plugins -( $OSTESTR '\[.*\b{{ test_regex }}\b.*\]' --no-pretty --subunit {% if skip_file_src != '' %}--blacklist_file={{ working_dir }}/{{ skip_file }}{% endif %} +( $OSTESTR '({{ test_regex }})' --no-pretty --subunit {% if skip_file_src != '' %}--blacklist_file={{ working_dir }}/{{ skip_file }}{% endif %} {% if tempest_workers is defined %} --concurrency {{ tempest_workers }} {% endif %} {% if tempest_isolated|bool %} --isolated {% endif %} {% if tempest_tests_file is defined %} --load-list={{ tempest_tests_file }} {% endif %}