add a script to help with testing the application

This commit is contained in:
Andreas Zweili 2019-01-20 20:56:46 +01:00
parent b881616d3a
commit 4a1f97a096
2 changed files with 28 additions and 0 deletions

View File

@ -94,6 +94,14 @@ repository.
#+begin_src sh
make test
#+end_src
To make testing the application while programming a bit easier there's a script
which reloads the application everytime a file changes in the ~borg_qt~
directory. You to use it run the following command from the root of the
repository.
#+begin_src sh
./scripts/debugging.sh
#+end_src
** Used packages

20
scripts/debugging.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
source venv/bin/activate
sigint_handler()
{
kill $PID
exit
}
trap sigint_handler SIGINT
cd borg_qt
while true; do
./borg_qt.py &
PID=$!
echo "---- Press Crtl+C to stop debugging. ----"
inotifywait -e modify -e move -e create -e delete -e attrib --exclude '.*(/\.|_flymake\.py)' -r `pwd`
sleep 0.5
kill $PID
done