diff options
author | Azul <azul@riseup.net> | 2017-07-20 15:31:56 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2017-07-20 21:23:17 +0200 |
commit | f6ff8482c14ad49c6ee77c4d7918520a0013c132 (patch) | |
tree | cf27beba525184e60e38ee765b44f29b1ee9e6c2 | |
parent | bd24e2024ad29fa72cae661ac5898cad4ace8e8b (diff) |
[test] keep artifacts inside the project dir
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rw-r--r-- | tests/functional/README.md | 4 | ||||
-rw-r--r-- | tests/functional/features/environment.py | 7 |
4 files changed, 12 insertions, 7 deletions
@@ -50,3 +50,9 @@ pkg/pyinst/build/ pkg/launcher/bitmask NOTES + +# logs and screenshots from failed functional tests +/failures/ + +# temporary home folders for functional tests +/tmp/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1182f0..078a9ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -75,7 +75,7 @@ functional_tests: artifacts: when: on_failure paths: - - "/tmp/bitmask-test/artifacts/*" + - failures name: "Bitmask_linux64_${CI_BUILD_REF}_e2e_screenshots" expire_in: 1 month tags: diff --git a/tests/functional/README.md b/tests/functional/README.md index 652de1c..12b0331 100644 --- a/tests/functional/README.md +++ b/tests/functional/README.md @@ -35,11 +35,11 @@ Install Docker and [gitlab-runner](https://docs.gitlab.com/runner/). Run the `functional_tests` job: gitlab-runner exec docker \ - --docker-volumes /tmp/bitmask-test/artifacts:/tmp/bitmask-test/artifacts \ + --docker-volumes /tmp/bitmask-test/failures:/builds/project-0/failures \ --env TEST_USERNAME='...' --env TEST_PASSWORD='...'\ functional_tests -In case of failing tests the resulting artifacts (screenshot, `.config` folder) will be available at `/tmp/bitmask-test/artifacts` on the host. +In case of failing tests the resulting artifacts (screenshot, `.config` folder) will be available at `/tmp/bitmask-test/failures` on the host. # Develop tests diff --git a/tests/functional/features/environment.py b/tests/functional/features/environment.py index b88ddd7..ae72b49 100644 --- a/tests/functional/features/environment.py +++ b/tests/functional/features/environment.py @@ -10,7 +10,7 @@ from selenium.webdriver.chrome.options import Options from leap.common.config import get_path_prefix DEFAULT_IMPLICIT_WAIT_TIMEOUT_IN_S = 10 -HOME_PATH = '/tmp/bitmask-test' +HOME_PATH = os.path.abspath('./tmp/bitmask-test') def before_all(context): @@ -78,9 +78,8 @@ def _save_config(context, step): def _artifact_path(step, filename=''): - string = 'failed {}'.format(str(step.name)) - slug = re.sub('\W', '-', string) - return os.path.join(HOME_PATH, 'artifacts', slug, filename) + slug = re.sub('\W', '-', str(step.name)) + return os.path.abspath(os.path.join('failures', slug, filename)) def _debug_on_error(context, step): |