Dan Smith | edee6dc | 2021-01-12 14:04:38 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # This is a small helper to speed development and debug with devstack. |
| 4 | # It is intended to help you run a single function in a project module |
| 5 | # without having to re-stack. |
| 6 | # |
| 7 | # For example, to run the just start_glance function, do this: |
| 8 | # |
| 9 | # ./tools/debug_function.sh glance start_glance |
| 10 | |
| 11 | if [ ! -f "lib/$1" ]; then |
| 12 | echo "Usage: $0 [project] [function] [function...]" |
| 13 | fi |
| 14 | |
| 15 | source stackrc |
| 16 | source lib/$1 |
| 17 | shift |
| 18 | set -x |
| 19 | while [ "$1" ]; do |
| 20 | echo ==== Running $1 ==== |
| 21 | $1 |
| 22 | echo ==== Done with $1 ==== |
| 23 | shift |
| 24 | done |