Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Bar code verification should be done by entity because generation does #28087

Merged
merged 3 commits into from
Feb 9, 2024

FIX: Remove unused global

45eb284
Select commit
Loading
Failed to load commit list.
Merged

FIX: Bar code verification should be done by entity because generation does #28087

FIX: Remove unused global
45eb284
Select commit
Loading
Failed to load commit list.
Travis CI / Travis CI - Pull Request succeeded Feb 9, 2024 in 4m 9s

Build Passed

The build passed, just like the previous build.

Details

This is a pull request build.

It is running a build against the merge commit, after merging #28087 FIX: Bar code verification should be done by entity because generation does.
Any changes that have been made to the 16.0 branch before the build ran are also included.

Jobs and Stages

This build only has a single job.
You can use jobs to test against multiple versions of your runtime or dependencies, or to speed up your build.

Build Configuration

Build Option Setting
Language PHP
Operating System Linux (Xenial)
Build Configuration
{
  "scan_logs": false,
  "language": "php",
  "os": [
    "linux"
  ],
  "dist": "xenial",
  "git": {
    "depth": 1
  },
  "services": [
    "memcached",
    "mysql",
    "postgresql"
  ],
  "addons": {
    "postgresql": "9.4",
    "apt": {
      "sources": [
        {
          "name": "pgdg-xenial"
        }
      ],
      "packages": [
        "apache2",
        "libapache2-mod-fastcgi",
        "pgloader"
      ]
    }
  },
  "env": [
    "global={:DEBUG=>\"false\"}"
  ],
  "jobs": {
    "fast_finish": true,
    "include": [
      {
        "stage": "PHP 5.6-7.4",
        "if": "type = push",
        "php": "5.6",
        "env": [
          {
            "DB": "postgresql"
          }
        ]
      },
      {
        "stage": "PHP 5.6-7.4",
        "if": "type = pull_request OR type = push",
        "php": "7.4.22",
        "env": [
          {
            "DB": "mysql"
          }
        ]
      },
      {
        "stage": "PHP Dev",
        "if": "type = push AND branch = develop",
        "php": "nightly",
        "env": [
          {
            "DB": "mysql"
          }
        ]
      }
    ]
  },
  "notifications": {
    "email": [
      {
        "on_success": "never",
        "on_failure": "never"
      }
    ],
    "irc": [
      {
        "channels": [
          "chat.freenode.net#dolibarr"
        ],
        "on_success": "change",
        "on_failure": "always",
        "use_notice": true
      }
    ]
  },
  "before_install": [
    "echo \"Disabling Xdebug for composer\"\nexport PHP_VERSION_NAME=$(phpenv version-name)\ncp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/xdebug.ini /tmp/xdebug.ini\nphpenv config-rm xdebug.ini\necho\n"
  ],
  "install": [
    "echo \"Updating Composer (version 2.5 is bugged and generate phpunit error Exception: Serialization of 'Closure' is not allowed)\"\n#rm $TRAVIS_BUILD_DIR/composer.json\n#rm $TRAVIS_BUILD_DIR/composer.lock\ncomposer -V\ncomposer self-update 2.4.4\n#composer -n init\n#composer -n config vendor-dir htdocs/includes\ncomposer -n config -g vendor-dir htdocs/includes\necho\n",
    "echo \"Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer, PHP Vardump check - for $TRAVIS_PHP_VERSION\"\nif [ \"$TRAVIS_PHP_VERSION\" = '5.6' ]; then\n  composer -n require phpunit/phpunit ^5 \\\n                      php-parallel-lint/php-parallel-lint ^1 \\\n                      php-parallel-lint/php-console-highlighter ^0 \\\n                      php-parallel-lint/php-var-dump-check ~0.4 \\\n                      squizlabs/php_codesniffer ^3\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = '7.0' ] || [ \"$TRAVIS_PHP_VERSION\" = '7.1' ] || [ \"$TRAVIS_PHP_VERSION\" = '7.2' ]; then\n  composer -n require phpunit/phpunit ^6 \\\n                      php-parallel-lint/php-parallel-lint ^1 \\\n                      php-parallel-lint/php-console-highlighter ^0 \\\n                      php-parallel-lint/php-var-dump-check ~0.4 \\\n                      squizlabs/php_codesniffer ^3\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = '7.3' ] || [ \"$TRAVIS_PHP_VERSION\" = '7.4' ] || [ \"$TRAVIS_PHP_VERSION\" = '7.4.22' ]; then\n  composer -n require phpunit/phpunit ^7 \\\n                      php-parallel-lint/php-parallel-lint ^1.2 \\\n                      php-parallel-lint/php-console-highlighter ^0 \\\n                      php-parallel-lint/php-var-dump-check ~0.4 \\\n                      squizlabs/php_codesniffer ^3\nfi\n# phpunit 9 is required for php 8\nif [ \"$TRAVIS_PHP_VERSION\" = 'nightly' ]; then\n    composer -n require --ignore-platform-reqs phpunit/phpunit ^7 \\\n                                               php-parallel-lint/php-parallel-lint ^1.2 \\\n                                               php-parallel-lint/php-console-highlighter ^0 \\\n                                               php-parallel-lint/php-var-dump-check ~0.4 \\\n                                               squizlabs/php_codesniffer ^3\nfi\necho\n",
    "echo \"Adding path of binaries tools installed by composer to the PATH\"\nexport PATH=\"$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH\"\necho $PATH\nls $TRAVIS_BUILD_DIR/vendor\nls $TRAVIS_BUILD_DIR/htdocs/includes/bin\necho\n"
  ],
  "before_script": [
    "echo Start travis\necho Current dir is `pwd`\necho Home dir is `echo ~`\necho TRAVIS_BUILD_DIR is $TRAVIS_BUILD_DIR\n",
    "echo \"Re-enabling Xdebug for PHP CodeSniffer and PHP Unit\"\nphpenv config-add /tmp/xdebug.ini\necho\n",
    "echo \"Setting up PHP\"\necho\necho \"Set timezone\"\necho 'date.timezone = \"Europe/Paris\"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini\nphpenv rehash\necho\n",
    "echo \"Versions information\"\necho\n# Check PHP\necho \"PHP version\"\nphp -i | head -\n# Check Parallel-lint version\necho \"Parallel-lint version\"\nwhich parallel-lint\nparallel-lint -V\n# Check PHP CodeSniffer version\necho \"PHPCS version\"\nwhich phpcs\nphpcs --version | head -\nphpcs -i | head -\n# Check PHP Vardump check version\necho \"PHP Vardump check version\"\nwhich var_dump_check\nvar_dump_check --version\n# Check PHPUnit version\necho \"PHPUnit version\"\nwhich phpunit\nphpunit --version | head -\n# Check Apache version\necho \"Apache version\"\napache2 -v | head -\n# Check Database\necho \"Database version\"\nmysql --version | head -\nmysql -e \"SELECT VERSION();\"  | head -\npsql --version\nif [ \"$DB\" = 'postgresql' ]; then\n  echo \"Check pgloader version\"\n  pgloader --version\nfi\necho\n",
    "echo \"Setting up database\"\nif [ \"$DB\" = 'mysql' ] || [ \"$DB\" = 'mariadb' ] || [ \"$DB\" = 'postgresql' ]; then\n  echo \"MySQL\"\n  mysql -u root -e 'DROP DATABASE IF EXISTS travis;'\n  mysql -u root -e 'CREATE DATABASE IF NOT EXISTS travis;'\n  mysql -u root -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'\n  mysql -u root -e 'FLUSH PRIVILEGES;'\n  mysql -u root -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql\nfi\nif [ \"$DB\" = 'postgresql' ]; then\n  #psql -c 'create database travis;' -U postgres\n  #psql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql\n  #pgloader mysql://root:pass@127.0.0.1/dolibarr_src postgresql://dolibarrowner:dolibarrownerpass@127.0.0.1/dolibarr_dest\n  echo pgloader mysql://root@127.0.0.1/travis postgresql://postgres@/travis\n  pgloader mysql://root@127.0.0.1/travis postgresql://postgres@/travis\n  echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql -U postgres travis\n  echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql -U postgres travis\nfi\necho\n",
    "export CONF_FILE=htdocs/conf/conf.php\necho \"Setting up Dolibarr $CONF_FILE\"\necho '<?php' > $CONF_FILE\necho '$'dolibarr_main_url_root=\\'http://127.0.0.1\\'';' >> $CONF_FILE\necho '$'dolibarr_main_document_root=\\'$TRAVIS_BUILD_DIR/htdocs\\'';' >> $CONF_FILE\necho '$'dolibarr_main_data_root=\\'$TRAVIS_BUILD_DIR/documents\\'';' >> $CONF_FILE\necho '$'dolibarr_main_db_host=\\'127.0.0.1\\'';' >> $CONF_FILE\necho '$'dolibarr_main_db_name=\\'travis\\'';' >> $CONF_FILE\necho '$'dolibarr_main_db_user=\\'travis\\'';' >> $CONF_FILE\necho '$'dolibarr_main_instance_unique_id=\\'travis1234567890\\'';' >> $CONF_FILE\nif [ \"$DB\" = 'mysql' ] || [ \"$DB\" = 'mariadb' ]; then\n  echo '$'dolibarr_main_db_type=\\'mysqli\\'';' >> $CONF_FILE\n  echo '$'dolibarr_main_db_port=\\'3306\\'';' >> $CONF_FILE\nfi\nif [ \"$DB\" = 'postgresql' ]; then\n  echo '$'dolibarr_main_db_type=\\'pgsql\\'';' >> $CONF_FILE\n  echo '$'dolibarr_main_db_port=\\'5432\\'';' >> $CONF_FILE\nfi\necho '$'dolibarr_main_authentication=\\'dolibarr\\'';' >> $CONF_FILE\ncat $CONF_FILE\necho\n",
    "echo \"Create documents directory and set permissions\"\n# and admin/temp subdirectory needed for unit tests\nmkdir -p $TRAVIS_BUILD_DIR/documents/admin/temp\nsudo chmod -R a+rwx $TRAVIS_BUILD_DIR/documents\necho \"***** First line of dolibarr.log\" > $TRAVIS_BUILD_DIR/documents/dolibarr.log\necho\n",
    "echo \"Setting up Apache + FPM\"",
    "sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf",
    "if [ \"$TRAVIS_PHP_VERSION\" = '7.0' ] || [ \"$TRAVIS_PHP_VERSION\" = '7.1' ] || [ \"$TRAVIS_PHP_VERSION\" = '7.2' ] || [ \"$TRAVIS_PHP_VERSION\" = '7.3' ] || [ \"$TRAVIS_PHP_VERSION\" = '7.4' ] || [ \"$TRAVIS_PHP_VERSION\" = '7.4.22' ] || [ \"$TRAVIS_PHP_VERSION\" = 'nightly' ]; then\n  # Copy the included pool\n  sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf\nfi\n",
    "sudo a2enmod rewrite actions fastcgi alias",
    "echo \"cgi.fix_pathinfo = 1\" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini",
    "sudo sed -i -e \"s,www-data,travis,g\" /etc/apache2/envvars",
    "sudo chown -R travis:travis /var/lib/apache2/fastcgi",
    "~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm",
    "sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf",
    "sudo sed -e \"s?%TRAVIS_BUILD_DIR%?$(pwd)?g\" --in-place /etc/apache2/sites-available/000-default.conf",
    "sudo cat /etc/apache2/sites-available/000-default.conf",
    "sudo service apache2 restart"
  ],
  "script": [
    "echo \"Checking webserver availability by a wget -O - http://127.0.0.1\"\n# Ensure we stop on error with set -e\nset +e\n# The wget should return a page with line '<meta name=\"generator\" content=\"Dolibarr installer\">\nwget -O - http://127.0.0.1 > test.html\nhead test.html\nsudo cat /var/log/apache2/travis_error_log\nset +e\necho\n",
    "echo \"Checking PHP syntax errors (only 1 version to not overload travis and avoid duplicate tests)\"\n# Ensure we catch errors\nset -e\n#parallel-lint --exclude htdocs/includes --blame .\n# Exclusions are defined in the ruleset.xml file\nif [ \"$TRAVIS_PHP_VERSION\" = \"7.4.22\" ]; then\n  parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \\\n    --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \\\n    --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \\\n    --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \\\n    --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --blame .\nfi\nset +e\necho\n",
    "echo \"Checking coding style (only for Pull Requests builds and 1 version to not overload travis and avoid duplicate tests)\"\n# Ensure we catch errors\nset -e\n# Exclusions are defined in the ruleset.xml file\nif [ \"$TRAVIS_PULL_REQUEST\" = \"false\" ] && [ \"$TRAVIS_PHP_VERSION\" = \"7.4.22\" ]; then\n  phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;\nfi\nset +e\necho\n",
    "echo \"Checking missing debug\"\n# Ensure we catch errors\nset -e\n# Exclusions are defined in the ruleset.xml file\nif [ \"$TRAVIS_PULL_REQUEST\" = \"false\" ] && [ \"$TRAVIS_PHP_VERSION\" = \"7.4.22\" ]; then\n   var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .\nfi\nset +e\necho\n",
    "export INSTALL_FORCED_FILE=htdocs/install/install.forced.php\necho \"Setting up Dolibarr $INSTALL_FORCED_FILE to test installation\"\n# Ensure we catch errors\nset +e\necho '<?php ' > $INSTALL_FORCED_FILE\necho '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE\nif [ \"$DB\" = 'mysql' ] || [ \"$DB\" = 'mariadb' ]; then\n  echo '$'force_install_type=\\'mysqli\\'';' >> $INSTALL_FORCED_FILE\nfi\nif [ \"$DB\" = 'postgresql' ]; then\n  echo '$'force_install_type=\\'pgsql\\'';' >> $INSTALL_FORCED_FILE\nfi\necho '$'force_install_dbserver=\\'127.0.0.1\\'';' >> $INSTALL_FORCED_FILE\necho '$'force_install_database=\\'travis\\'';' >> $INSTALL_FORCED_FILE\necho '$'force_install_databaselogin=\\'travis\\'';' >> $INSTALL_FORCED_FILE\necho '$'force_install_databasepass=\\'\\'';' >> $INSTALL_FORCED_FILE\necho '$'force_install_port=\\'5432\\'';' >> $INSTALL_FORCED_FILE\necho '$'force_install_prefix=\\'llx_\\'';' >> $INSTALL_FORCED_FILE\necho '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE\necho '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE\necho '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE\necho '$'force_install_main_data_root=\\'$TRAVIS_BUILD_DIR/htdocs\\'';' >> $INSTALL_FORCED_FILE\n#cat $INSTALL_FORCED_FILE\n",
    "echo \"Setting up database to test migrations\"\nif [ \"$DB\" = 'mysql' ] || [ \"$DB\" = 'mariadb' ] || [ \"$DB\" = 'postgresql' ]; then\n  echo \"MySQL\"\n  mysql -e 'DROP DATABASE IF EXISTS travis;'\n  mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'\n  mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'\n  mysql -e 'FLUSH PRIVILEGES;'\n  mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql\nfi\nif [ \"$DB\" = 'postgresql' ]; then\n  #pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql\n  #pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr\n  echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis\n  pgloader mysql://root@127.0.0.1/travis postgresql:///travis\n  echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql travis\n  echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql travis\n  #echo 'select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'llx_accountingaccount' | psql travis\n  #echo 'select * from information_schema.table_constraints;' | psql travis\n  #echo 'ALTER TABLE \"llx_accounting_account\" DROP CONSTRAINT \"idx_16390_primary\"' | psql travis\nfi\necho\n",
    "echo \"Upgrading Dolibarr\"\n# Ensure we catch errors. Set this to +e if you want to go to the end to see log files.\nset +e\ncd htdocs/install\nphp upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log\nphp upgrade2.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-2.log\nphp step5.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-3.log\nphp upgrade.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370.log\nphp upgrade2.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-2.log\nphp step5.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-3.log\nphp upgrade.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380.log\nphp upgrade2.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-2.log\nphp step5.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-3.log\nphp upgrade.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390.log\nphp upgrade2.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-2.log\nphp step5.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-3.log\nphp upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log\nphp upgrade2.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-2.log\nphp step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log\nphp upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log\nphp upgrade2.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-2.log\nphp step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log\nphp upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log\nphp upgrade2.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-2.log\nphp step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log\nphp upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log\nphp upgrade2.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-2.log\nphp step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log\nphp upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log\nphp upgrade2.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-2.log\nphp step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log\nphp upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log\nphp upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log\nphp step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log\nphp upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log\nphp upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log\nphp step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log\nphp upgrade.php 10.0.0 11.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade10001100.log\nphp upgrade2.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-2.log\nphp step5.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-3.log\nphp upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log\nphp upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log\nphp step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log\nphp upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log\nphp upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log\nphp step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log\nphp upgrade.php 13.0.0 14.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade13001400.log\nphp upgrade2.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-2.log\nphp step5.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-3.log\nphp upgrade.php 14.0.0 15.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade14001500.log\nphp upgrade2.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-2.log\nphp step5.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-3.log\nphp upgrade.php 15.0.0 16.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade15001600.log\nphp upgrade2.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-2.log\nphp step5.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-3.log\nls -alrt $TRAVIS_BUILD_DIR/\n",
    "echo \"Enabling new modules\"\n# Enable modules not enabled into original dump\nset -e\nphp upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_PRODUCTBATCH,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_STRIPE,MAIN_MODULE_EXPENSEREPORT > $TRAVIS_BUILD_DIR/enablemodule.log\nphp upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $TRAVIS_BUILD_DIR/enablemodule.log\nphp upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $TRAVIS_BUILD_DIR/enablemodule.log\nphp upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KNOWLEDGEMANAGEMENT,MAIN_MODULE_EVENTORGANIZATION,MAIN_MODULE_PARTNERSHIP >> $TRAVIS_BUILD_DIR/enablemodule.log\necho $?\ncd -\nset +e\necho\n#cat /tmp/dolibarr_install.log\ncat $TRAVIS_BUILD_DIR/enablemodule.log\n",
    "echo \"Unit testing\"\n# Ensure we catch errors. Set this to +e if you want to go to the end to see dolibarr.log file.\nset -e\nphpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php\nphpunitresult=$?\necho \"Phpunit return code = $phpunitresult\"\nset +e\n"
  ],
  "after_script": [
    "echo \"After script - Output last lines of dolibarr.log\"\nls $TRAVIS_BUILD_DIR/documents\n#cat $TRAVIS_BUILD_DIR/documents/dolibarr.log\nsudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log\n"
  ],
  "after_success": [
    "echo Success\n"
  ],
  "after_failure": [
    "echo Failure detected, so we show samples of log to help diagnose\n# This part of code is executed only if previous command that fails are enclosed with set +e\n# Upgrade log files\nfor ficlog in `ls $TRAVIS_BUILD_DIR/*.log`\ndo\n  echo \"Debugging informations for file $ficlog\"\n  #cat $ficlog\ndone\n# Apache log file\necho \"Debugging informations for file apache error.log\"\nsudo cat /var/log/apache2/travis_error_log\nif [ \"$DEBUG\" = true ]; then\n  # Dolibarr log file\n  echo \"Debugging informations for file dolibarr.log (latest 50 lines)\"\n  tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log\n  # Database log file\n  echo \"Debugging informations for file mysql error.log\"\n  sudo tail -n 50 /var/log/mysql/error.log\n  # TODO: PostgreSQL log file\n  echo\nfi"
  ]
}