File: run-tests

package info (click to toggle)
dirspec 13.10-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 236 kB
  • ctags: 163
  • sloc: python: 467; makefile: 18; sh: 9
file content (32 lines) | stat: -rwxr-xr-x 981 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
#
# Copyright 2010-2012 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

set -e -x

# Run the tests
python ./setup.py build test clean

# Only run the python3 tests if available
if [ -x "`which python3`" ]; then
    python3 ./setup.py build test clean
else
    echo "Python 3 not found. Not running Python 3 tests."
fi

# Run the style checks
pyflakes dirspec setup.py
pep8 --exclude=.pc --repeat . setup.py