mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-03 22:35:45 +02:00
tests: add tests to CI and start to migrate old ones
Pretty all tests are broken, but at least, forcing the CI to build it will force people to check it. Change-Id: I974905a893b6a53ce71890b63a01be6a791ea556
This commit is contained in:
parent
0e2bd79b8d
commit
da61006eb9
10 changed files with 1741 additions and 1425 deletions
120
extras/ci/client-qt-gnulinux/Jenkinsfile
vendored
Normal file
120
extras/ci/client-qt-gnulinux/Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
* Copyright (C) 2022 Savoir-faire Linux Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation; either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
* License along with this program. If not, see
|
||||
* <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Requirements:
|
||||
// - gerrit-trigger plugin
|
||||
// - Docker plugin
|
||||
// - ansicolor plugin
|
||||
|
||||
pipeline {
|
||||
agent 'jami-buildmachine-04.mtl.sfl'
|
||||
|
||||
triggers {
|
||||
gerrit customUrl: '',
|
||||
gerritProjects: [
|
||||
[branches: [[compareType: 'PLAIN', pattern: 'master']],
|
||||
compareType: 'PLAIN',
|
||||
disableStrictForbiddenFileVerification: false,
|
||||
pattern: 'jami-client-qt']],
|
||||
triggerOnEvents: [
|
||||
commentAddedContains('!build'),
|
||||
patchsetCreated(excludeDrafts: true, excludeNoCodeChange: true,
|
||||
excludeTrivialRebase: true)]
|
||||
}
|
||||
|
||||
options {
|
||||
ansiColor('xterm')
|
||||
}
|
||||
|
||||
parameters {
|
||||
string(name: 'GERRIT_REFSPEC',
|
||||
defaultValue: 'refs/heads/master',
|
||||
description: 'The Gerrit refspec to fetch.')
|
||||
}
|
||||
|
||||
def cpuCount = sh returnStdout: true, script: 'nproc || echo -n 4'
|
||||
|
||||
stage('SCM Checkout') {
|
||||
deleteDir()
|
||||
// Checkout jami-project to obtain daemon/LRC/client-qt repositories
|
||||
sh """
|
||||
|
||||
git clone --depth=1 --branch=master https://${JAMI_GERRIT_URL}/jami-project
|
||||
cd jami-project
|
||||
# git submodule update --init daemon lrc client-qt
|
||||
git submodule update --init daemon client-qt
|
||||
git submodule foreach 'git checkout master'
|
||||
|
||||
cd client-qt
|
||||
git fetch "https://${JAMI_GERRIT_URL}/jami-client-qt" ${GERRIT_REFSPEC}
|
||||
git checkout FETCH_HEAD
|
||||
git submodule update --init --recursive
|
||||
cd ..
|
||||
"""
|
||||
topDir = pwd() + '/jami-project'
|
||||
}
|
||||
|
||||
dir (topDir) {
|
||||
stage('Building Docker Image') {
|
||||
docker.build('client-validation', "-f client-qt/extras/build/docker/Dockerfile.client-qt-gnulinux --no-cache .")
|
||||
}
|
||||
|
||||
def jenkinsUID = sh(returnStdout: true, script: 'id -u jenkins').replaceAll("\n", '').trim()
|
||||
def jenkinsGID = sh(returnStdout: true, script: 'id -g jenkins').replaceAll("\n", '').trim()
|
||||
def jenkinsUser = jenkinsUID+':'+jenkinsGID
|
||||
|
||||
docker.image('client-validation').withRun('-t -u '+jenkinsUser+' -v '+pwd()+':/foo:rw -w /foo -e BATCH_MODE=1', '/bin/bash') {
|
||||
container -> code:{
|
||||
def base_cmd = 'docker exec -t '+container.id+" sh -c '"
|
||||
def exec_cmd = { cmd -> sh base_cmd+cmd+"'" }
|
||||
|
||||
def dockerTopDir = '/foo'
|
||||
def daemonDir = dockerTopDir + '/daemon'
|
||||
def clientDir = dockerTopDir + '/client-qt'
|
||||
def installDir = dockerTopDir + '/install'
|
||||
|
||||
stage('Build Client') {
|
||||
ansiColor('css') {
|
||||
exec_cmd("""
|
||||
cd ${clientDir}
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=${installDir}/client-qt \
|
||||
-DLIBJAMI_INCLUDE_DIR=${daemonDir}/src/jami \
|
||||
-DLIBJAMI_XML_INTERFACES_DIR=${daemonDir}/bin/dbus \
|
||||
-DCMAKE_PREFIX_PATH=/usr/lib/libqt-jami \
|
||||
-DENABLE_TESTS=True
|
||||
make -j${cpuCount}
|
||||
make install
|
||||
""")
|
||||
}
|
||||
}
|
||||
|
||||
stage('Run Tests') {
|
||||
ansiColor('css') {
|
||||
exec_cmd("""
|
||||
cd ${clientDir}
|
||||
cd tests/qml
|
||||
../../../build/tests/qml_tests
|
||||
""")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -39,6 +39,12 @@ Rectangle {
|
|||
signal messagesCleared
|
||||
signal messagesLoaded
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible)
|
||||
return
|
||||
UtilsAdapter.clearInteractionsCache(CurrentAccount.id, CurrentConversation.id)
|
||||
}
|
||||
|
||||
function focusChatView() {
|
||||
chatViewFooter.textInput.forceActiveFocus()
|
||||
swarmDetailsPanel.visible = false
|
||||
|
|
|
@ -246,6 +246,8 @@ Rectangle {
|
|||
NoUsernamePopup {
|
||||
id: popup
|
||||
|
||||
objectName: "popup"
|
||||
|
||||
visible: false
|
||||
|
||||
onJoinClicked: {
|
||||
|
|
|
@ -73,7 +73,6 @@ Rectangle {
|
|||
ColumnLayout {
|
||||
id: createSIPAccountPageColumnLayout
|
||||
|
||||
|
||||
spacing: JamiTheme.wizardViewPageLayoutSpacing
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
|
|
@ -95,6 +95,7 @@ Popup {
|
|||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
MaterialButton {
|
||||
objectName: "joinButton"
|
||||
preferredWidth: text.contentWidth
|
||||
textLeftPadding: JamiTheme.buttontextPadding
|
||||
textRightPadding: JamiTheme.buttontextPadding
|
||||
|
|
File diff suppressed because it is too large
Load diff
1589
tests/qml/to_fix/tst_WizardView.qml
Normal file
1589
tests/qml/to_fix/tst_WizardView.qml
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue