Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
pirms 5 gadiem
Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
Fix coverage (#2603) * Add utility to prepare C coverage for upload to coveralls.io It turned out that it is more easy to write own script then debug and fix coveralls utility (https://github.com/eddyxu/cpp-coveralls). gcov-coveralls.py can be used as a replacement for coveralls. * Save coverage data from .gcda files only once Coverage data in .gcda files is merged after each binary invocation, so we can run all test and then gather coverage data. If we dump them two times execution counts will be more then they be. * Switch from coveralls (cpp-coveralls) to own script Problem with coveralls was, that coverage for source files outside build directory was not added to the report. * Add tool to dump info from json for coveralls.io * Add debug * Fix: don't die if there is no service_job_id in json * Debug * Fix dump_coveralls.py * Rename to gcov_coveralls.py (s/-/_/) For most files in this repo '_' is used as separator. * Don't add source code to coveralls JSON According to https://docs.coveralls.io/api-introduction Coverals don't need source code, only MD5 digest to tracks changes. Anyway source code is already added by luacov-coveralls and source_digest is added by cpp-coveralls and gcov_coveralls.py Both options seems to work for now. * Provide path to source directory to merge_coveralls.py merge_coveralls.py has code to filter files and remove prefixes. When --root points to source directory merge_coveralls.py can strip prefix from absolute path in JSONs generated by luacov-coveralls. * Style Don't add parameters with default values. * Make --output optional It useful mainly for debugging. We can send report without saving it. * Log CI_COMMIT_AUTHOR env var It is not clear from drone.io source how CI_COMMIT_AUTHOR variable is set. Log it to see what it means. * Move merge_coveralls.py to test/tools This script is used not only for funcional test coverage, but for rspamd-test coverage too. * Remove debug * Style Use more compact formatting. * Write comment about parallel tests running [SKIP CI] Document why running tests in parallel may be bad idea (but still do so). * Fix typo [SKIP CI]
pirms 5 gadiem
Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
pirms 5 gadiem
Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
Fix coverage (#2603) * Add utility to prepare C coverage for upload to coveralls.io It turned out that it is more easy to write own script then debug and fix coveralls utility (https://github.com/eddyxu/cpp-coveralls). gcov-coveralls.py can be used as a replacement for coveralls. * Save coverage data from .gcda files only once Coverage data in .gcda files is merged after each binary invocation, so we can run all test and then gather coverage data. If we dump them two times execution counts will be more then they be. * Switch from coveralls (cpp-coveralls) to own script Problem with coveralls was, that coverage for source files outside build directory was not added to the report. * Add tool to dump info from json for coveralls.io * Add debug * Fix: don't die if there is no service_job_id in json * Debug * Fix dump_coveralls.py * Rename to gcov_coveralls.py (s/-/_/) For most files in this repo '_' is used as separator. * Don't add source code to coveralls JSON According to https://docs.coveralls.io/api-introduction Coverals don't need source code, only MD5 digest to tracks changes. Anyway source code is already added by luacov-coveralls and source_digest is added by cpp-coveralls and gcov_coveralls.py Both options seems to work for now. * Provide path to source directory to merge_coveralls.py merge_coveralls.py has code to filter files and remove prefixes. When --root points to source directory merge_coveralls.py can strip prefix from absolute path in JSONs generated by luacov-coveralls. * Style Don't add parameters with default values. * Make --output optional It useful mainly for debugging. We can send report without saving it. * Log CI_COMMIT_AUTHOR env var It is not clear from drone.io source how CI_COMMIT_AUTHOR variable is set. Log it to see what it means. * Move merge_coveralls.py to test/tools This script is used not only for funcional test coverage, but for rspamd-test coverage too. * Remove debug * Style Use more compact formatting. * Write comment about parallel tests running [SKIP CI] Document why running tests in parallel may be bad idea (but still do so). * Fix typo [SKIP CI]
pirms 5 gadiem
Fix coverage (#2603) * Add utility to prepare C coverage for upload to coveralls.io It turned out that it is more easy to write own script then debug and fix coveralls utility (https://github.com/eddyxu/cpp-coveralls). gcov-coveralls.py can be used as a replacement for coveralls. * Save coverage data from .gcda files only once Coverage data in .gcda files is merged after each binary invocation, so we can run all test and then gather coverage data. If we dump them two times execution counts will be more then they be. * Switch from coveralls (cpp-coveralls) to own script Problem with coveralls was, that coverage for source files outside build directory was not added to the report. * Add tool to dump info from json for coveralls.io * Add debug * Fix: don't die if there is no service_job_id in json * Debug * Fix dump_coveralls.py * Rename to gcov_coveralls.py (s/-/_/) For most files in this repo '_' is used as separator. * Don't add source code to coveralls JSON According to https://docs.coveralls.io/api-introduction Coverals don't need source code, only MD5 digest to tracks changes. Anyway source code is already added by luacov-coveralls and source_digest is added by cpp-coveralls and gcov_coveralls.py Both options seems to work for now. * Provide path to source directory to merge_coveralls.py merge_coveralls.py has code to filter files and remove prefixes. When --root points to source directory merge_coveralls.py can strip prefix from absolute path in JSONs generated by luacov-coveralls. * Style Don't add parameters with default values. * Make --output optional It useful mainly for debugging. We can send report without saving it. * Log CI_COMMIT_AUTHOR env var It is not clear from drone.io source how CI_COMMIT_AUTHOR variable is set. Log it to see what it means. * Move merge_coveralls.py to test/tools This script is used not only for funcional test coverage, but for rspamd-test coverage too. * Remove debug * Style Use more compact formatting. * Write comment about parallel tests running [SKIP CI] Document why running tests in parallel may be bad idea (but still do so). * Fix typo [SKIP CI]
pirms 5 gadiem
Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
Drone speedup (#2588) * Start switchind test to custom Docker images Using Docker images with pre-installed delendencies will speedup testing. * Debug build in drone.io * Use variable instead hardcoded path to the source * Debug variable substitution by drone Also according to comments in code DRONE_WORKSPACE is deprecated and CI_WORKSPACE is a new form. * One more try to use variables. It looks like drone uses same rules as docker-compose: https://docs.docker.com/compose/compose-file/#variable-substitution * Cleanup debug * Less verbose make output * Be consistent in variable escaping It works without escaping only becuse ${VAR} currently expanded by drone, but $VAR is not. * Use alpine base image for nodejs It is smaller. * Return rspamd-test * Revert variable escaping Wihtout escaping it is more easy to copy-past command for testing. Just don't use ${var} when var should be expanded by shell and not drone. * Add debug * Fix yaml parsing error * Fix exit code capture It should be done on the same line, because drone insert 'echo + cmd' between commands. * Remove debug * Readability No functional changes. * Return functional tests * Be consistent * Add git stub for coveralls * Send coverage * Fix yaml parsing error * Add links to Dockerfiles * Send test log in case of test failure XXX if rspamd-test failed, but functional was successful robot log will be attached (but not useful). * Don't run rspamd-test and functional tests in parallel It looks like there is a race condition in writing coverage files. * Try to run tests in parallel * Add debug * Fix parallel test run test/rspamd-test and functional test both use luacov.stats.out file in current directory. Run ./rspamd-test from anther directory. * Use drone condition for sending coveralls report Also don't send report if empty tocken was provided. * Add mininal python3 compatibility
pirms 5 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. ---
  2. kind: pipeline
  3. type: docker
  4. name: default
  5. platform:
  6. os: linux
  7. arch: amd64
  8. steps:
  9. - name: prepare
  10. # any image with a root shell can be used here, but Ubuntu used as base
  11. # image for build and test images and we need to download it anyway
  12. image: ubuntu:20.04
  13. pull: if-not-exists
  14. volumes:
  15. - name: rspamd
  16. path: /rspamd
  17. commands:
  18. - install -d -o nobody -g nogroup /rspamd/build /rspamd/install /rspamd/fedora/build /rspamd/fedora/install
  19. - name: build
  20. # https://github.com/rspamd/rspamd-build-docker/blob/master/ubuntu-build/Dockerfile
  21. image: rspamd/ci-ubuntu-build
  22. pull: always
  23. volumes:
  24. - name: rspamd
  25. path: /rspamd
  26. depends_on: [ prepare ]
  27. commands:
  28. # build directories should be writable by nobody, for rspamd in functional tests
  29. # works as nobody and writes coverage files there
  30. - test "$(id -un)" = nobody
  31. - cd /rspamd/build
  32. - >
  33. cmake
  34. -DCMAKE_INSTALL_PREFIX=/rspamd/install
  35. -DCMAKE_RULE_MESSAGES=OFF
  36. -DCMAKE_VERBOSE_MAKEFILE=ON
  37. -DENABLE_COVERAGE=ON
  38. -DENABLE_LIBUNWIND=ON
  39. $CI_WORKSPACE
  40. - ncpu=$(getconf _NPROCESSORS_ONLN)
  41. - make -j $ncpu install
  42. - make -j $ncpu rspamd-test
  43. - make -j $ncpu rspamd-test-cxx
  44. - name: build-clang
  45. # https://github.com/rspamd/rspamd-build-docker/blob/master/fedora-build/Dockerfile
  46. image: rspamd/ci-fedora-build
  47. pull: always
  48. volumes:
  49. - name: rspamd
  50. path: /rspamd
  51. depends_on: [ prepare ]
  52. commands:
  53. - test "$(id -un)" = nobody
  54. - cd /rspamd/fedora/build
  55. - export LDFLAGS='-fuse-ld=lld'
  56. #- export CFLAGS='-fsanitize=address,undefined,implicit-integer-truncation'
  57. #- export CXXFLAGS='-fsanitize=address,undefined,implicit-integer-truncation'
  58. - export ASAN_OPTIONS=detect_leaks=0
  59. - >
  60. cmake
  61. -DCMAKE_INSTALL_PREFIX=/rspamd/fedora/install
  62. -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
  63. -DCMAKE_RULE_MESSAGES=OFF
  64. -DCMAKE_VERBOSE_MAKEFILE=ON
  65. -DENABLE_CLANG_PLUGIN=ON
  66. -DENABLE_FULL_DEBUG=ON
  67. -DSANITIZE=address
  68. $CI_WORKSPACE
  69. - ncpu=$(getconf _NPROCESSORS_ONLN)
  70. - make -j $ncpu install
  71. - make -j $ncpu rspamd-test
  72. - make -j $ncpu rspamd-test-cxx
  73. # We run rspamd-test (unit test) and functional test (runned by robot) in
  74. # parallel to save time. To avoid conflict in saving lua coverage we run them
  75. # from different directories. For C code coverage counters is saved to .gcda
  76. # files and binary contain absolute path to them, so rspamd-test and
  77. # processes started by functional test are writing to the same files. On
  78. # process exit new coverage data merged with existing content of .gcda file.
  79. # Race is possible if rspamd-test and some rspamd process in functional test
  80. # will try to write .gcda file simultaneous. But it is very unlikely and
  81. # performance is more important then correct coverage data.
  82. - name: rspamd-test
  83. # https://github.com/rspamd/rspamd-build-docker/blob/master/ubuntu-test/Dockerfile
  84. image: rspamd/ci-ubuntu-test
  85. pull: always
  86. volumes:
  87. - name: rspamd
  88. path: /rspamd
  89. depends_on: [ build ]
  90. commands:
  91. - test "$(id -un)" = nobody
  92. - ulimit -c unlimited
  93. # rspamd-test and functional test both use luacov.stats.out file and should be started from
  94. # different directories (if started in parallel)
  95. - cd /rspamd/build/test
  96. - set +e
  97. - ./rspamd-test -p /rspamd/lua; EXIT_CODE=$?
  98. - set -e
  99. # shell sets exit status of a process terminated by a signal to '128 + signal-number'
  100. # if rspamd-test was terminated by a signal it should be SIGSEGV or SIGABRT, try to examine core
  101. - >
  102. if [ $EXIT_CODE -gt 128 ]; then
  103. gdb --batch -ex 'thread apply all bt full' -c /var/tmp/*.rspamd-test.core ./rspamd-test;
  104. exit $EXIT_CODE;
  105. fi
  106. # luacov-coveralls reads luacov.stats.out written by rspamd-test using luacov module
  107. # and writes json report for coveralls.io service
  108. - luacov-coveralls -o /rspamd/build/unit_test_lua.json --dryrun
  109. - set +e
  110. - ./rspamd-test-cxx -s; EXIT_CODE=$?
  111. - set -e
  112. # shell sets exit status of a process terminated by a signal to '128 + signal-number'
  113. # if rspamd-test was terminated by a signal it should be SIGSEGV or SIGABRT, try to examine core
  114. - >
  115. if [ $EXIT_CODE -gt 128 ]; then
  116. gdb --batch -ex 'thread apply all bt full' -c /var/tmp/*.rspamd-test-cxx.core ./rspamd-test-cxx;
  117. exit $EXIT_CODE;
  118. fi
  119. - exit $EXIT_CODE
  120. - name: test-fedora-clang
  121. # https://github.com/rspamd/rspamd-build-docker/blob/master/fedora-test/Dockerfile
  122. image: rspamd/ci-fedora-test
  123. pull: always
  124. volumes:
  125. - name: rspamd
  126. path: /rspamd
  127. depends_on: [ build-clang ]
  128. commands:
  129. - test "$(id -un)" = nobody
  130. # Asan reserves 20Tb of virtual memory, limit core size to 2 Gb to avoid writing huge core
  131. - ulimit -c 2097152
  132. - ulimit -s unlimited
  133. # disable leak sanitizer: too many leaks detected, most of them probably FP
  134. - export ASAN_OPTIONS="detect_leaks=0:print_stacktrace=1:disable_coredump=0"
  135. - export UBSAN_OPTIONS="print_stacktrace=1:print_summary=0:log_path=/tmp/ubsan"
  136. - cd /rspamd/fedora/build/test
  137. - set +e
  138. - ./rspamd-test -p /rspamd/lua; EXIT_CODE=$?
  139. - set -e
  140. # shell sets exit status of a process terminated by a signal to '128 + signal-number'
  141. # if rspamd-test was terminated by a signal it should be SIGSEGV or SIGABRT, try to examine core
  142. - >
  143. if [ $EXIT_CODE -gt 128 ]; then
  144. gdb --batch -ex 'bt' -c /var/tmp/*.rspamd-test.core ./rspamd-test;
  145. fi
  146. - set +e
  147. - ./rspamd-test-cxx -s; EXIT_CODE=$?
  148. - set -e
  149. # shell sets exit status of a process terminated by a signal to '128 + signal-number'
  150. # if rspamd-test was terminated by a signal it should be SIGSEGV or SIGABRT, try to examine core
  151. - >
  152. if [ $EXIT_CODE -gt 128 ]; then
  153. gdb --batch -ex 'thread apply all bt full' -c /var/tmp/*.rspamd-test-cxx.core ./rspamd-test-cxx;
  154. exit $EXIT_CODE;
  155. fi
  156. - cat /tmp/ubsan.* || true
  157. - exit $EXIT_CODE
  158. - name: functional
  159. # https://github.com/rspamd/rspamd-build-docker/blob/master/ubuntu-test-func/Dockerfile
  160. image: rspamd/ci-ubuntu-test-func
  161. pull: always
  162. volumes:
  163. - name: rspamd
  164. path: /rspamd
  165. depends_on: [ build ]
  166. commands:
  167. - cd /rspamd/build
  168. - ulimit -c unlimited
  169. - ulimit -s unlimited
  170. # some rspamd processes during this test work as root and some as nobody
  171. # use umask to create world-writable files so nobody can write to *.gcda files created by root
  172. - umask 0000
  173. - set +e
  174. - RSPAMD_INSTALLROOT=/rspamd/install robot --removekeywords wuks --exclude isbroken $CI_WORKSPACE/test/functional/cases; EXIT_CODE=$?
  175. - set -e
  176. # upload test results to nginx frontent using WebDAV PUT
  177. - >
  178. if [ -n "$HTTP_PUT_AUTH" ]; then
  179. $CI_WORKSPACE/test/tools/http_put.py log.html report.html https://$DRONE_SYSTEM_HOSTNAME/testlogs/$DRONE_REPO/$DRONE_BUILD_NUMBER/;
  180. fi
  181. # core_pattern=/var/tmp/%u.%e.core so one or two cores can be saved for each binary
  182. - core_files=$(find /var/tmp/ -name '*.core')
  183. # use 'info proc mappings' to find path to executable file for given core
  184. # first mapping is usually program executable
  185. - >
  186. for core in $core_files;
  187. do
  188. exe=$(gdb --batch -ex 'info proc mappings' -c $core | tail -1 | awk '{print $5}');
  189. gdb --batch -ex 'bt' -c $core $exe; echo '---';
  190. done
  191. - exit $EXIT_CODE
  192. environment:
  193. HTTP_PUT_AUTH: { from_secret: http_put_auth }
  194. - name: send-coverage
  195. image: rspamd/ci-ubuntu-test
  196. pull: if-not-exists
  197. volumes:
  198. - name: rspamd
  199. path: /rspamd
  200. depends_on: [ functional, rspamd-test ]
  201. commands:
  202. - cd /rspamd/build
  203. # extract coverage data for C code from .gcda files and save it in a format suitable for coveralls.io
  204. - $CI_WORKSPACE/test/tools/gcov_coveralls.py --exclude test --prefix /rspamd/build --prefix $CI_WORKSPACE --out coverage.c.json
  205. # luacov-coveralls reads luacov.stats.out generated by functional tests
  206. # (see collect_lua_coverage() in test/functional/lib/rspamd.py)
  207. # and writes json report for coveralls.io
  208. - luacov-coveralls -o coverage.functional.lua.json --dryrun
  209. # * merge coverage for C and Lua code
  210. # * remove prefixes from absolute paths (in luacov-coveralls files), filter test, contrib, e. t.c
  211. # * upload report to coveralls.io
  212. - $CI_WORKSPACE/test/tools/merge_coveralls.py --root $CI_WORKSPACE --input coverage.c.json unit_test_lua.json coverage.functional.lua.json --token=$COVERALLS_REPO_TOKEN
  213. environment:
  214. COVERALLS_REPO_TOKEN: { from_secret: coveralls_repo_token }
  215. when:
  216. branch: [ master ]
  217. # don't send coverage report for pull request
  218. event: [push, tag]
  219. - name: eslint
  220. image: node:17-alpine
  221. pull: if-not-exists
  222. failure: ignore
  223. commands:
  224. - npm install
  225. - ./node_modules/.bin/eslint -v
  226. - ./node_modules/.bin/eslint ./
  227. # Run stylelint checks
  228. - ./node_modules/.bin/stylelint -v
  229. - npm show stylelint-config-standard version
  230. - ./node_modules/.bin/stylelint ./**/*.css ./**/*.html ./**/*.js
  231. - name: perl-tidyall
  232. # https://github.com/rspamd/rspamd-build-docker/blob/master/perl-tidyall/Dockerfile
  233. image: rspamd/ci-perl-tidyall
  234. pull: if-not-exists
  235. failure: ignore
  236. commands:
  237. - tidyall --version
  238. - perltidy --version | head -1
  239. # checks are configured in .tidyallrc at the top of rspamd repo
  240. - tidyall --all --check-only --no-cache --data-dir /tmp/tidyall
  241. - name: notify
  242. image: drillster/drone-email
  243. pull: if-not-exists
  244. depends_on:
  245. - rspamd-test
  246. - test-fedora-clang
  247. - functional
  248. - send-coverage
  249. - eslint
  250. - perl-tidyall
  251. settings:
  252. from: noreply@rspamd.com
  253. host: { from_secret: email_host }
  254. username: { from_secret: email_username }
  255. password: { from_secret: email_password }
  256. when:
  257. status: [ failure ]
  258. volumes:
  259. - name: rspamd
  260. temp: {}
  261. trigger:
  262. event: [push, tag, pull_request]
  263. ---
  264. kind: signature
  265. hmac: 9e142da57023b8a8a23e6c34e6de62552ab32cd5323e9b47a09ae20089992b67
  266. ...