From 1e2e7075d5e1d3d578a1aca98b0ce5170c350498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Fri, 14 Apr 2023 13:02:04 +0200 Subject: [PATCH] ci: add suite and tags parameters to e2e CI job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows for easier running of individual test suites and selecting tags. Signed-off-by: Jakub SokoĊ‚owski --- ci/Jenkinsfile.tests-e2e | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/ci/Jenkinsfile.tests-e2e b/ci/Jenkinsfile.tests-e2e index 0224934408..6fb8659ecd 100644 --- a/ci/Jenkinsfile.tests-e2e +++ b/ci/Jenkinsfile.tests-e2e @@ -14,6 +14,16 @@ pipeline { description: 'Decides whether binaries are built with debug symbols.', defaultValue: params.RELEASE ?: false ) + string( + name: 'SQUISH_SUITE', + description: 'Name of test suite to run in Squish. Defaults to all.', + defaultValue: '*' + ) + string( + name: 'SQUISH_TAGS', + description: 'List of tags to use for Squish tests separated by spaces.', + defaultValue: '~mayfail ~merge ~relyon-mailserver' + ) choice( name: 'VERBOSE', description: 'Level of verbosity based on nimbus-build-system setup.', @@ -124,6 +134,11 @@ pipeline { throttle(categories: ['status-desktop-e2e-tests']) } steps { script { + /* Combine specified tags with --tags flag for each. */ + def tags = params.SQUISH_TAGS.split(' ') + def flags = Collections.nCopies(tags.size(), "--tags") + def tagsFlags = [flags, tags].transpose().flatten() + wrap([ $class: 'Xvfb', autoDisplayName: true, @@ -131,16 +146,13 @@ pipeline { screen: '2560x1440x24', ]) { script { def result = squish([ - extraOptions: [ + extraOptions: (tagsFlags + [ '--retry', '2', - '--tags', '~mayfail', - '--tags', '~merge', - '--tags', '~relyon-mailserver', '--config', 'addAUT', 'nim_status_client', "${WORKSPACE}/bin", - ].join('\n'), + ]).join('\n'), squishPackageName: 'squish-7.1-20230222-1555-qt515x-linux64', - testSuite: "${WORKSPACE}/test/ui-test/testSuites/*", + testSuite: "${WORKSPACE}/test/ui-test/testSuites/${params.SQUISH_SUITE}", ]) print("Squish run result: ${result}") if (!['SUCCESS'].contains(result)) {