]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Drop functional/contrib directory
authorarmando-migliaccio <armamig@gmail.com>
Tue, 6 Jan 2015 19:03:14 +0000 (11:03 -0800)
committerarmando-migliaccio <armamig@gmail.com>
Tue, 6 Jan 2015 20:21:55 +0000 (12:21 -0800)
This has been replaced by tests/contrib and the infra change [1]
is now in force and this copy is no longer necessary.

[1] https://review.openstack.org/#/c/142603/

Change-Id: Idbe0814e6b258d2f394894c1923f459cc1bdd4d2

neutron/tests/contrib/README
neutron/tests/contrib/gate_hook.sh
neutron/tests/functional/contrib/README [deleted file]
neutron/tests/functional/contrib/filters.template [deleted file]
neutron/tests/functional/contrib/gate_hook.sh [deleted file]
neutron/tests/functional/contrib/post_test_hook.sh [deleted file]

index 1836db15fb83014615621dbeb73c7af13c80b069..a73d75af9921eecdce149569df14543768429627 100644 (file)
@@ -1,3 +1,3 @@
 The files in this directory are intended for use by the
-neutron-dsvm-functional infra jobs that run the functional test suite
-in the gate.
+Neutron infra jobs that run the various functional test
+suites in the gate.
index 2387c08cbb335d24f784543dd96a383a3f24fc15..b9a39fbfef17e86c0f1c32ffc52fb0974224086e 100644 (file)
@@ -11,7 +11,7 @@ then
     # Add a rootwrap filter to support test-only
     # configuration (e.g. a KillFilter for processes that
     # use the python installed in a tox env).
-    FUNC_FILTER=$BASE/new/neutron/neutron/tests/functional/contrib/filters.template
+    FUNC_FILTER=$BASE/new/neutron/neutron/tests/contrib/filters.template
     sed -e "s+\$BASE_PATH+$BASE/new/neutron/.tox/dsvm-functional+" \
         $FUNC_FILTER | sudo tee /etc/neutron/rootwrap.d/functional.filters > /dev/null
 
diff --git a/neutron/tests/functional/contrib/README b/neutron/tests/functional/contrib/README
deleted file mode 100644 (file)
index 1836db1..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-The files in this directory are intended for use by the
-neutron-dsvm-functional infra jobs that run the functional test suite
-in the gate.
diff --git a/neutron/tests/functional/contrib/filters.template b/neutron/tests/functional/contrib/filters.template
deleted file mode 100644 (file)
index cfd37a2..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# neutron-rootwrap command filters to support functional testing.  It
-# is NOT intended to be used outside of a test environment.
-#
-# This file should be owned by (and only-writeable by) the root user
-
-[Filters]
-# '$BASE_PATH' is intended to be replaced with the expected tox path
-# (e.g. /opt/stack/new/neutron/.tox/dsvm-functional) by the neutron
-# functional jenkins job.  This ensures that tests can kill the
-# processes that they launch with their containing tox environment's
-# python.
-kill_tox_python: KillFilter, root, $BASE_PATH/bin/python, -9
-
-# enable ping from namespace
-ping_filter: CommandFilter, ping, root
-
-# enable curl from namespace
-curl_filter: CommandFilter, curl, root
diff --git a/neutron/tests/functional/contrib/gate_hook.sh b/neutron/tests/functional/contrib/gate_hook.sh
deleted file mode 100644 (file)
index 2387c08..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-
-set -ex
-
-venv=${1:-"dsvm-functional"}
-
-if [ "$venv" == "dsvm-functional" ]
-then
-    $BASE/new/devstack-gate/devstack-vm-gate.sh
-
-    # Add a rootwrap filter to support test-only
-    # configuration (e.g. a KillFilter for processes that
-    # use the python installed in a tox env).
-    FUNC_FILTER=$BASE/new/neutron/neutron/tests/functional/contrib/filters.template
-    sed -e "s+\$BASE_PATH+$BASE/new/neutron/.tox/dsvm-functional+" \
-        $FUNC_FILTER | sudo tee /etc/neutron/rootwrap.d/functional.filters > /dev/null
-
-    # Use devstack functions to install mysql and psql servers
-    TOP_DIR=$BASE/new/devstack
-    source $TOP_DIR/functions
-    source $TOP_DIR/lib/config
-    source $TOP_DIR/stackrc
-    source $TOP_DIR/lib/database
-    source $TOP_DIR/localrc
-
-    disable_service postgresql
-    enable_service mysql
-    initialize_database_backends
-    install_database
-
-    disable_service mysql
-    enable_service postgresql
-    initialize_database_backends
-    install_database
-
-    # Set up the 'openstack_citest' user and database in each backend
-    tmp_dir=`mktemp -d`
-
-    cat << EOF > $tmp_dir/mysql.sql
-CREATE DATABASE openstack_citest;
-CREATE USER 'openstack_citest'@'localhost' IDENTIFIED BY 'openstack_citest';
-CREATE USER 'openstack_citest' IDENTIFIED BY 'openstack_citest';
-GRANT ALL PRIVILEGES ON *.* TO 'openstack_citest'@'localhost';
-GRANT ALL PRIVILEGES ON *.* TO 'openstack_citest';
-FLUSH PRIVILEGES;
-EOF
-    /usr/bin/mysql -u root < $tmp_dir/mysql.sql
-
-    cat << EOF > $tmp_dir/postgresql.sql
-CREATE USER openstack_citest WITH CREATEDB LOGIN PASSWORD 'openstack_citest';
-CREATE DATABASE openstack_citest WITH OWNER openstack_citest;
-EOF
-    # User/group postgres needs to be given access to tmp_dir
-    setfacl -m g:postgres:rwx $tmp_dir
-    sudo -u postgres /usr/bin/psql --file=$tmp_dir/postgresql.sql
-fi
diff --git a/neutron/tests/functional/contrib/post_test_hook.sh b/neutron/tests/functional/contrib/post_test_hook.sh
deleted file mode 100644 (file)
index fce0288..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-
-set -xe
-
-NEUTRON_DIR="$BASE/new/neutron"
-SCRIPTS_DIR="/usr/local/jenkins/slave_scripts"
-
-venv=${1:-"dsvm-functional"}
-
-function generate_testr_results {
-    # Give job user rights to access tox logs
-    sudo -H -u stack chmod o+rw -R .
-    if [ -f ".testrepository/0" ] ; then
-        .tox/$venv/bin/subunit-1to2 < .testrepository/0 > ./testrepository.subunit
-        .tox/$venv/bin/python $SCRIPTS_DIR/subunit2html.py ./testrepository.subunit testr_results.html
-        gzip -9 ./testrepository.subunit
-        gzip -9 ./testr_results.html
-        sudo mv ./*.gz /opt/stack/logs/
-    fi
-}
-
-
-function dsvm_functional_prep_func {
-    :
-}
-
-
-function api_prep_func {
-    TEMPEST_DIR="$BASE/new/tempest"
-    sudo -H -u $owner tox -e $venv --notest
-    sudo -H -u $owner .tox/$venv/bin/pip install -e $TEMPEST_DIR
-}
-
-
-if [ "$venv" == "dsvm-functional" ]
-then
-    owner=stack
-    prep_func="dsvm_functional_prep_func"
-elif [ "$venv" == "api" ]
-then
-    owner=tempest
-    prep_func="api_prep_func"
-fi
-
-# Set owner permissions according to job's requirements.
-sudo chown -R $owner:stack $NEUTRON_DIR
-# Prep the environment according to job's requirements.
-$prep_func
-
-# Run tests
-cd $NEUTRON_DIR
-echo "Running neutron $venv test suite"
-set +e
-sudo -H -u $owner tox -e $venv
-testr_exit_code=$?
-set -e
-
-# Collect and parse results
-generate_testr_results
-exit $testr_exit_code