#!/bin/bash

set -ex

$BASE/new/devstack-gate/devstack-vm-gate.sh

# Ideally devstack would only install dependencies
# rather than starting services, but for now unstack is
# a cheap way of accomplishing the same result.
$BASE/new/devstack/unstack.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 > /etc/neutron/rootwrap.d/functional.filters

#!/bin/bash

set -ex

$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

Fix func job hook script permission problems
Fix func job hook script permission problems

- The hook script is the wrong place to unstack since
  it needs to run as the stack user with sudo privileges and those
  permissions are removed as part of the devstack-vm-gate.sh script.

- The functional job gate hook script needs to use sudo to
  install the test-only rootwrap filter.

Change-Id: Ib2e5ec016a5a414dd9675328650efb2b39b0e3fe
Related-Bug: #1360658
