mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-01-27 00:33:34 +00:00
add Debian autopkgtests
This commit is contained in:
parent
477425f3fe
commit
ab89530819
3
debian/tests/control
vendored
Normal file
3
debian/tests/control
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# https://people.debian.org/~eriberto/README.package-tests.html
|
||||
Tests: syntax, phpunit
|
||||
Depends: davical, php-cli, phpunit
|
||||
8
debian/tests/phpunit
vendored
Executable file
8
debian/tests/phpunit
vendored
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# run our test suite, but on the installed package
|
||||
|
||||
set -e
|
||||
|
||||
# 2) phpunit tests
|
||||
phpunit --include-path "/usr/share/davical:/usr/share/awl" testing/phpunit
|
||||
|
||||
19
debian/tests/syntax
vendored
Executable file
19
debian/tests/syntax
vendored
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# run our test suite, but on the installed package
|
||||
|
||||
set -e
|
||||
|
||||
# 1) simple php syntax check
|
||||
for PHP in /usr/share/davical/htdocs/*.php /usr/share/davical/inc/*.php
|
||||
do
|
||||
php -l ${PHP} >> $AUTOPKGTEST_TMP/test-syntax
|
||||
done
|
||||
|
||||
if grep -v 'No syntax errors detected' $AUTOPKGTEST_TMP/test-syntax
|
||||
then
|
||||
cat $AUTOPKGTEST_TMP/test-syntax
|
||||
exit 1
|
||||
else
|
||||
echo "OK (Syntax checked)";
|
||||
fi
|
||||
rm $AUTOPKGTEST_TMP/test-syntax
|
||||
Loading…
x
Reference in New Issue
Block a user