diff options
author | Anton Yuzhaninov <citrin+git@citrin.ru> | 2018-10-13 06:16:34 -0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-13 11:16:34 +0100 |
commit | f1223526c78d8b3bd9a325a85e3ffb1285555faf (patch) | |
tree | 485a2385975d0c39ec97faf8e4411007931ebb80 /test | |
parent | 17a7d2e236715ada721749e19bca861778060900 (diff) | |
download | rspamd-f1223526c78d8b3bd9a325a85e3ffb1285555faf.tar.gz rspamd-f1223526c78d8b3bd9a325a85e3ffb1285555faf.zip |
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
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/util/merge_coveralls.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/functional/util/merge_coveralls.py b/test/functional/util/merge_coveralls.py index dca00518d..66648a135 100755 --- a/test/functional/util/merge_coveralls.py +++ b/test/functional/util/merge_coveralls.py @@ -1,10 +1,17 @@ #!/usr/bin/env python +from __future__ import print_function + import argparse import json import os +import sys + import requests +# Python 2/3 compatibility +if sys.version_info.major > 2: + xrange = range # install path to repository mapping # if path mapped to None, it means that the file should be ignored (i.e. test file/helper) @@ -132,12 +139,12 @@ if __name__ == '__main__': with open(args.output, 'w') as f: f.write(json.dumps(j1)) - if not args.token is None: + if args.token: j1['repo_token'] = args.token print("sending data to coveralls...") r = requests.post('https://coveralls.io/api/v1/jobs', files={"json_file": json.dumps(j1)}) response = json.loads(r.text) - print "uploaded %s\nmessage:%s" % (response['url'], response['message']) + print("uploaded %s\nmessage:%s" % (response['url'], response['message'])) # post https://coveralls.io/api/v1/jobs # print args |