Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
documentation:latest:contribute [2019/07/02 20:04]
maxbes perltidy instructions
documentation:latest:contribute [2019/12/04 15:35] (current)
coudot [Install dependencies]
Line 30: Line 30:
 //root :// //root ://
   apt install aptitude   apt install aptitude
-  aptitude install vim make devscripts yui-compressor git git-gui libjs-uglify coffeescript cpanminus+  aptitude install vim make devscripts yui-compressor git git-gui libjs-uglify coffeescript cpanminus ​autopkgtest pkg-perl-autopkgtest
   aptitude install libauth-yubikey-webclient-perl libnet-smtp-server-perl   aptitude install libauth-yubikey-webclient-perl libnet-smtp-server-perl
   ​   ​
Line 84: Line 84:
 ===== Install dependencies ​ ===== ===== Install dependencies ​ =====
  
-  aptitude install libapache-session-perl libcache-cache-perl libclone-perl libconfig-inifiles-perl libconvert-pem-perl libcrypt-openssl-bignum-perl libcrypt-openssl-rsa-perl libcrypt-openssl-x509-perl libcrypt-rijndael-perl libdbi-perl libdigest-hmac-perl libemail-sender-perl libgd-securityimage-perl libhtml-template-perl libio-string-perl libjson-perl libmime-tools-perl libmouse-perl libnet-ldap-perl libplack-perl libregexp-assemble-perl libregexp-common-perl libsoap-lite-perl libstring-random-perl libunicode-string-perl liburi-perl libwww-perl libxml-simple-perl libxml-libxslt-perl libcrypt-urandom-perl libconvert-base32-perl cpanminus+  aptitude install libapache-session-perl libcache-cache-perl libclone-perl libconfig-inifiles-perl libconvert-pem-perl libcrypt-openssl-bignum-perl libcrypt-openssl-rsa-perl libcrypt-openssl-x509-perl libcrypt-rijndael-perl libdbi-perl libdigest-hmac-perl libemail-sender-perl libgd-securityimage-perl libhtml-template-perl libio-string-perl libjson-perl libmime-tools-perl libmouse-perl libnet-ldap-perl libplack-perl libregexp-assemble-perl libregexp-common-perl libsoap-lite-perl libstring-random-perl libtext-unidecode-perl libunicode-string-perl liburi-perl libwww-perl libxml-simple-perl libxml-libxslt-perl libcrypt-urandom-perl libconvert-base32-perl cpanminus ​
   aptitude install apache2 libapache2-mod-fcgid libapache2-mod-perl2 ​ # install Apache   aptitude install apache2 libapache2-mod-fcgid libapache2-mod-perl2 ​ # install Apache
   aptitude install nginx nginx-extras ​ # install Nginx   aptitude install nginx nginx-extras ​ # install Nginx
Line 93: Line 93:
 ===== Working Project ​ ===== ===== Working Project ​ =====
  
 +==== Unit tests ====
 +
 +Launch unit tests:
 +<​code>​
   make test # or manager_test,​ portal_test,​ ... to launch unit tests   make test # or manager_test,​ portal_test,​ ... to launch unit tests
-  ​Doing one unit test : +</​code>​ 
-  ## Go to parent test directory+ 
 +Same tests launched on a simulated install 
 +<​code>​ 
 +  make autopkgtest ​or autopkg_portal,​ autopkg_manager,​ ... to launch unit tests 
 +</​code>​ 
 +   
 +Execute an unit test : 
 +<​code>​ 
 +  # Building project 
 +  cd ~/​lemonldap-ng/;​ make 
 +  ​# Go to parent test directory
   cd ~/​lemonldap-ng/​lemonldap-ng-portal   cd ~/​lemonldap-ng/​lemonldap-ng-portal
-  ​## and execute the test :+  # and execute the unit test:
   prove -v t/​67-CheckUser.t   prove -v t/​67-CheckUser.t
-  # Using local platform ​:+</​code>​ 
 + 
 +Launch tests with LDAP backend, for example with OpenLDAP LTB package: 
 +<​code>​ 
 +make LLNGTESTLDAP=1 LLNGTESTLDAP_SLAPD_BIN=/​usr/​local/​openldap/​libexec/​slapd LLNGTESTLDAP_SLAPADD_BIN=/​usr/​local/​openldap/​sbin/​slapadd LLNGTESTLDAP_SCHEMA_DIR=/​usr/​local/​openldap/​etc/​openldap/​schema/​ test 
 +</​code>​ 
 + 
 +==== Other commands ==== 
 +<​code>​
   make start_web_server # TESTUSESSL=1 to enable SSL engine (only available for Apache)   make start_web_server # TESTUSESSL=1 to enable SSL engine (only available for Apache)
   make start_web_server TESTWEBSERVER=nginx # to use Nginx web server   make start_web_server TESTWEBSERVER=nginx # to use Nginx web server
Line 109: Line 131:
   make manifest # to update manifest   make manifest # to update manifest
   make tidy # to magnify perl files (perl best pratices)   make tidy # to magnify perl files (perl best pratices)
-  cd lemonldap-ng-portal && prove t/XXXX # To launch specific unit test+</code>