~ubuntu-branches/ubuntu/vivid/neutron/vivid-updates

« back to all changes in this revision

Viewing changes to tools/misc-sanity-checks.sh

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-03-30 11:17:19 UTC
  • mfrom: (1.1.21)
  • Revision ID: package-import@ubuntu.com-20150330111719-h0gx7233p4jkkgfh
Tags: 1:2015.1~b3-0ubuntu1
* New upstream milestone release:
  - d/control: Align version requirements with upstream.
  - d/control: Add new dependency on oslo-log.
  - d/p/*: Rebase.
  - d/control,d/neutron-plugin-hyperv*: Dropped, decomposed into
    separate project upstream.
  - d/control,d/neutron-plugin-openflow*: Dropped, decomposed into
    separate project upstream.
  - d/neutron-common.install: Add neutron-rootwrap-daemon and 
    neutron-keepalived-state-change binaries.
  - d/rules: Ignore neutron-hyperv-agent when installing; only for Windows.
  - d/neutron-plugin-cisco.install: Drop neutron-cisco-cfg-agent as
    decomposed into separate project upstream.
  - d/neutron-plugin-vmware.install: Drop neutron-check-nsx-config and
    neutron-nsx-manage as decomposed into separate project upstream.
  - d/control: Add dependency on python-neutron-fwaas to neutron-l3-agent.
* d/pydist-overrides: Add overrides for oslo packages.
* d/control: Fixup type in package description (LP: #1263539).
* d/p/fixup-driver-test-execution.patch: Cherry pick fix from upstream VCS
  to support unit test exection in out-of-tree vendor drivers.
* d/neutron-common.postinst: Allow general access to /etc/neutron but limit
  access to root/neutron to /etc/neutron/neutron.conf to support execution
  of unit tests in decomposed vendor drivers.
* d/control: Add dependency on python-neutron-fwaas to neutron-l3-agent
  package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
check_opinionated_shell () {
27
27
    # The purpose of this function is to avoid casual introduction of more
28
 
    # bash dependency.  Please consider alternatives before commiting code
 
28
    # bash dependency.  Please consider alternatives before committing code
29
29
    # which uses bash specific features.
30
30
 
31
31
    # Check that shell scripts are not bash opinionated (ignore comments though)
32
32
    # If you cannot avoid the use of bash, please change the EXPECTED var below.
33
33
    OBSERVED=$(grep -E '^([[:space:]]*[^#[:space:]]|#!).*bash' \
34
34
               tox.ini tools/* | wc -l)
35
 
    EXPECTED=4
 
35
    EXPECTED=7
36
36
    if [ ${EXPECTED} -ne ${OBSERVED} ]; then
37
37
        echo "Bash usage has been detected!" >>$FAILURES
38
38
    fi
61
61
    fi
62
62
}
63
63
 
 
64
 
 
65
check_identical_policy_files () {
 
66
    # For unit tests, we maintain their own policy.json file to make test suite
 
67
    # independent of whether it's executed from the neutron source tree or from
 
68
    # site-packages installation path. We don't want two copies of the same
 
69
    # file to diverge, so checking that they are identical
 
70
    diff etc/policy.json neutron/tests/etc/policy.json 2>&1 > /dev/null
 
71
    if [ "$?" -ne 0 ]; then
 
72
        echo "policy.json files must be identical!" >>$FAILURES
 
73
    fi
 
74
}
 
75
 
64
76
# Add your checks here...
65
77
check_opinionated_shell
66
78
check_no_symlinks_allowed
67
79
check_pot_files_errors
 
80
check_identical_policy_files
68
81
 
69
82
# Fail, if there are emitted failures
70
83
if [ -f $FAILURES ]; then