tests: add a make target to check file permissions
Additions: - [makefile] check versioned files are not executable - [travis] call the new make target Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
parent
122d90ef8d
commit
fc17813bd1
7 changed files with 16 additions and 1 deletions
|
@ -11,4 +11,5 @@ install:
|
||||||
- composer install
|
- composer install
|
||||||
script:
|
script:
|
||||||
- make clean
|
- make clean
|
||||||
|
- make check_permissions
|
||||||
- make test
|
- make test
|
||||||
|
|
16
Makefile
16
Makefile
|
@ -16,7 +16,7 @@ BIN = vendor/bin
|
||||||
PHP_SOURCE = index.php application tests plugins
|
PHP_SOURCE = index.php application tests plugins
|
||||||
PHP_COMMA_SOURCE = index.php,application,tests,plugins
|
PHP_COMMA_SOURCE = index.php,application,tests,plugins
|
||||||
|
|
||||||
all: static_analysis_summary test
|
all: static_analysis_summary check_permissions test
|
||||||
|
|
||||||
##
|
##
|
||||||
# Concise status of the project
|
# Concise status of the project
|
||||||
|
@ -98,6 +98,20 @@ mess_detector_summary: mess_title
|
||||||
printf "$$warnings\t$$rule\n"; \
|
printf "$$warnings\t$$rule\n"; \
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
##
|
||||||
|
# Checks source file & script permissions
|
||||||
|
##
|
||||||
|
check_permissions:
|
||||||
|
@echo "----------------------"
|
||||||
|
@echo "Check file permissions"
|
||||||
|
@echo "----------------------"
|
||||||
|
@for file in `git ls-files`; do \
|
||||||
|
if [ -x $$file ]; then \
|
||||||
|
errors=true; \
|
||||||
|
echo "$${file} is executable"; \
|
||||||
|
fi \
|
||||||
|
done; [ -z $$errors ] || false
|
||||||
|
|
||||||
##
|
##
|
||||||
# PHPUnit
|
# PHPUnit
|
||||||
# Runs unitary and functional tests
|
# Runs unitary and functional tests
|
||||||
|
|
0
application/HttpUtils.php
Executable file → Normal file
0
application/HttpUtils.php
Executable file → Normal file
0
application/LinkUtils.php
Executable file → Normal file
0
application/LinkUtils.php
Executable file → Normal file
0
application/Url.php
Executable file → Normal file
0
application/Url.php
Executable file → Normal file
0
plugins/qrcode/qrcode.css
Executable file → Normal file
0
plugins/qrcode/qrcode.css
Executable file → Normal file
0
tpl/tools.html
Executable file → Normal file
0
tpl/tools.html
Executable file → Normal file
Loading…
Reference in a new issue