diff --git a/bin/check.py b/bin/mutalyzer similarity index 97% rename from bin/check.py rename to bin/mutalyzer index 0ffd2d00758bb1d5dc613a9fcc7ee27d424aff38..c1af903257df91e05b936af06169335e708b04b6 100755 --- a/bin/check.py +++ b/bin/mutalyzer @@ -12,9 +12,10 @@ Usage: import sys import os -import Mutalyzer -from Modules import Output -from Modules import Config + +import mutalyzer +from mutalyzer.output import Output +from mutalyzer.config import Config def main(cmd): @@ -23,8 +24,8 @@ def main(cmd): @todo: documentation """ - C = Config.Config() - O = Output.Output(__file__, C.Output) + C = Config() + O = Output(__file__, C.Output) O.addMessage(__file__, -1, "INFO", "Received variant " + cmd) diff --git a/bin/run_tests b/bin/run_tests deleted file mode 100755 index 33d4c4866c4e8dfc5c1566a04eed239b91314604..0000000000000000000000000000000000000000 --- a/bin/run_tests +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# This is just an example of running the test suite and producing a HTML -# coverage report. -# Something like this should eventually be used on the test server as a -# post-commit hook. - -nosetests --with-coverage --cover-package mutalyzer --cover-html --cover-html-dir=/tmp/nosecover -v diff --git a/bin/find_log_bugs b/extras/log-tools/find-crashes.py similarity index 100% rename from bin/find_log_bugs rename to extras/log-tools/find-crashes.py diff --git a/extras/post-install.sh b/extras/post-install.sh new file mode 100644 index 0000000000000000000000000000000000000000..35ff4468f0f4cd0356409dd132d46e74845d8fdb --- /dev/null +++ b/extras/post-install.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Post-install script for Mutalyzer. Run after the setuptools installation +# (python setup.py install). +# +# Usage (from the source root directory): +# sudo bash extras/post-install.sh + +# Todo: +# - Database setup +# - Copy doc to /usr/share/doc + +if [ ! -f /etc/mutalyzer/config ]; do + mkdir -p /etc/mutalyzer + cp extras/config.example /etc/mutalyzer/config + chmod -R u=rwX,go=rX /etc/mutalyzer +fi + +touch /var/log/mutalyzer.log +chown www-data:www-data /var/log/mutalyzer.log +chmod u=rw,go=r /var/log/mutalyzer.log + +mkdir -p /var/cache/mutalyzer +chown -R www-data:www-data /var/cache/mutalyzer +chmod -R u=rwX,go=rX /var/cache/mutalyzer + +if [ ! -f /etc/init.d/mutalyzer-batchd ]; do + cp extras/init.d/mutalyzer-batchd /etc/init.d/mutalyzer-batchd + chmod u=rwx,go=rx /etc/init.d/mutalyzer-batchd +fi diff --git a/setup.py b/setup.py index 4dcd083b1a7aa636c1c9a0b23ea05f57f761c51c..64219d5b7403d7fa009e76ee04beb600ee506286 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ setup( platforms=['any'], packages=find_packages(exclude=['doc', 'extras', 'tests']), include_package_data=True, - scripts=['bin/mutalyzer-batchd'], + scripts=['bin/mutalyzer', 'bin/mutalyzer-batchd'], zip_safe=False )