From fea9e85962150f94142eb6144980eae9597181e3 Mon Sep 17 00:00:00 2001 From: Liang Fang Date: Wed, 18 Mar 2020 20:09:44 -0700 Subject: [PATCH] Add tempest tests to zuul Add tempest tests to zuul check and gate. This includes two parts of tests: - Tests in tempest repo - Tests in cinder-tempest-plugin Change-Id: I6ea4d60f41bf0d312360c450e0038bc6f21a44ce Signed-off-by: Liang Fang --- .zuul.yaml | 23 +++++++++++++++++++++++ devstack/plugin.sh | 14 +++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.zuul.yaml b/.zuul.yaml index e84e13c..ab357bb 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,8 +1,31 @@ +- job: + name: devstack-plugin-open-cas-tempest + parent: tempest-full-py3 + description: | + Base integration tests that runs with the open-cas devstack plugin and py3. + required-projects: + - opendev.org/openstack/cinder-tempest-plugin + - opendev.org/openstack/devstack-plugin-open-cas + timeout: 7200 + vars: + devstack_localrc: + # Volume local cache don't support multiattach + ENABLE_VOLUME_MULTIATTACH: False + tempest_plugins: + - cinder-tempest-plugin + devstack_plugins: + devstack-plugin-open-cas: https://opendev.org/openstack/devstack-plugin-open-cas + tox_envlist: all + tempest_test_regex: (^tempest\.(api|scenario)|(^cinder_tempest_plugin)) + tempest_test_blacklist: '{{ ansible_user_dir }}/{{ zuul.projects["opendev.org/openstack/tempest"].src_dir }}/tools/tempest-integrated-gate-storage-blacklist.txt' + - project: check: jobs: - openstack-tox-bashate + - devstack-plugin-open-cas-tempest gate: jobs: - openstack-tox-bashate + - devstack-plugin-open-cas-tempest diff --git a/devstack/plugin.sh b/devstack/plugin.sh index afb51e8..bb0ca10 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -8,12 +8,19 @@ OPENCAS_CACHE_SIZE=${OPENCAS_CACHE_SIZE:-1048576} function git_clone_opencas { cd $OPENCAS_REPO_DIR - git_clone $OPENCAS_REPO_URL $OPENCAS_REPO_DIR $OPENCAS_REPO_BRANCH + git clone $OPENCAS_REPO_URL $OPENCAS_REPO_DIR/open-cas-linux -b $OPENCAS_REPO_BRANCH cd open-cas-linux git submodule update --init } function compile_opencas { + if is_ubuntu; then + install_package linux-headers-$(uname -r) gcc + elif is_fedora; then + install_package kernel-headers.x86_64 kernel-devel.x86_64 gcc + else + exit_distro_not_supported "installing packages" + fi sudo ./configure make } @@ -73,6 +80,11 @@ if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then install_opencas echo_summary "create cache instance" create_cache_instance +elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then + # configure open-cas in /path/to/nova-cpu.conf + iniset $NOVA_CPU_CONF compute volume_local_cache_driver opencas + iniset $NOVA_CPU_CONF compute volume_local_cache_instance_ids 1 + iniset $TEMPEST_CONFIG volume-feature-enabled volume_local_cache True fi if [[ "$1" == "unstack" ]]; then