From 1f987c8c1157ae745e9fb9e446a96febeb8457f7 Mon Sep 17 00:00:00 2001 From: Eliseu Egewarth Date: Mon, 14 May 2018 12:41:22 -0300 Subject: [PATCH] Alterando scripts de QA para executar sempre na raiz do projeto Signed-off-by: Eliseu Egewarth --- .travis.yml | 4 ++-- check_qa.sh => scripts/django/check_qa.sh | 6 +++++- test_and_check_qa.sh => scripts/django/test_and_check_qa.sh | 5 ++++- 3 files changed, 11 insertions(+), 4 deletions(-) rename check_qa.sh => scripts/django/check_qa.sh (88%) rename test_and_check_qa.sh => scripts/django/test_and_check_qa.sh (53%) diff --git a/.travis.yml b/.travis.yml index 134943144..f54ee6d20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: python python: - - 3.4.3 + - 3.5 services: - postgresql @@ -20,7 +20,7 @@ script: - ./manage.py migrate - ./manage.py bower install - py.test --create-db - # - ./test_and_check_qa.sh + # - ./scripts/django/test_and_check_qa.sh addons: hosts: diff --git a/check_qa.sh b/scripts/django/check_qa.sh similarity index 88% rename from check_qa.sh rename to scripts/django/check_qa.sh index 47f2b56d3..393ad49fd 100755 --- a/check_qa.sh +++ b/scripts/django/check_qa.sh @@ -1,7 +1,11 @@ #!/bin/bash # Verifica se um breakpoint foi esquecido no código -me=`basename "$0"` +me="$0" + +git_project_root=$(git rev-parse --show-toplevel) +cd ${git_project_root} + busca=`grep --color=auto --exclude=$me --exclude=ipython_log.py* -r -l "pdb.set_trace()" .` if [ ! -z "$busca" ] diff --git a/test_and_check_qa.sh b/scripts/django/test_and_check_qa.sh similarity index 53% rename from test_and_check_qa.sh rename to scripts/django/test_and_check_qa.sh index 14231ce80..024139bba 100755 --- a/test_and_check_qa.sh +++ b/scripts/django/test_and_check_qa.sh @@ -2,6 +2,9 @@ # QA checks: run this before every commit +git_project_root=$(git rev-parse --show-toplevel) +cd ${git_project_root} + py.test py.test --ds=sapl.crud.tests.settings sapl/crud/tests -./check_qa.sh +./scripts/django/check_qa.sh