|
1 | 1 | #!/bin/bash |
2 | | - |
3 | | -# Ugly way to get any python interpreter. This is necessary because the script will run |
4 | | -# both with Python 2.7 and Python 3.x under Travis. |
5 | | -PYTHONS=$(which python3 python2.7 python) |
6 | | -PYTHON=$(echo $PYTHONS | cut -d" " -f1) |
7 | | - |
8 | | -if [ -z "${PYTHON}" ]; then |
9 | | - echo "ERROR: no Python interpreter found." |
10 | | - exit 1 |
11 | | -fi |
12 | | -echo "Using Python interpreter ${PYTHON}" |
13 | | - |
14 | | -# Return an error if any of the following commands fails. |
15 | 2 | set -e |
| 3 | + |
16 | 4 | echo "example1.cmd, --show-all-calls" |
17 | | -${PYTHON} cmd-call-graph.py --show-all-calls < examples/example1.cmd > examples/example1.dot |
| 5 | +python cmd-call-graph.py --show-all-calls < examples/example1.cmd > examples/example1.dot |
18 | 6 | echo |
19 | 7 | echo "example1.cmd, --show-all-calls --show-node-stats" |
20 | | -${PYTHON} cmd-call-graph.py --show-all-calls --show-node-stats < examples/example1.cmd > examples/example1-nodestats.dot |
| 8 | +python cmd-call-graph.py --show-all-calls --show-node-stats < examples/example1.cmd > examples/example1-nodestats.dot |
21 | 9 | echo |
22 | 10 | echo "example1.cmd, without --show-all-calls" |
23 | | -${PYTHON} cmd-call-graph.py < examples/example1.cmd > examples/example1-noshowall.dot |
| 11 | +python cmd-call-graph.py < examples/example1.cmd > examples/example1-noshowall.dot |
24 | 12 | echo |
25 | 13 | echo "loc.cmd, with --show-node-status and without --show-all-calls" |
26 | | -${PYTHON} cmd-call-graph.py --show-node-stats < examples/loc.cmd > examples/loc.dot |
| 14 | +python cmd-call-graph.py --show-node-stats < examples/loc.cmd > examples/loc.dot |
27 | 15 |
|
28 | 16 | dot -Tpng examples/example1.dot > examples/example1.png |
29 | 17 | dot -Tpng examples/example1-nodestats.dot > examples/example1-nodestats.png |
|
0 commit comments