mirror of
git://code.qt.io/qt/qt5.git
synced 2025-12-21 07:28:21 +08:00
CMake: Modify the RunCMake tests to clone from the Coin CI git mirror
This helps with the test stability when code.qt.io is down or slow. Pick-to: 6.10 6.11 Change-Id: I0bdaaa06772a94e73cb33d3f827e4e327123b60a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
@@ -246,16 +246,22 @@ function(setup_qt_sources)
|
||||
|
||||
set(RunCMake_TEST_COMMAND_WORKING_DIRECTORY "${working_dir}")
|
||||
|
||||
set(code_qt_io_mirror "https://code.qt.io/qt/qt5.git")
|
||||
set(gerrit_mirror "https://codereview.qt-project.org/qt/qt5")
|
||||
get_repo_base_url(ci_repo_base_url)
|
||||
set(remote_clone_url "${ci_repo_base_url}/qt/qt5.git")
|
||||
|
||||
# Make a copy of the qt6 repo on which the test will operate on.
|
||||
# On the CI we clone it from the official mirror, because we don't have a git repo, but only
|
||||
# a source archive.
|
||||
# On a local build we use the current qt6 checkout.
|
||||
# On the CI we clone qt6 from one of the following sources, in order:
|
||||
# - the Coin CI git mirror
|
||||
# - or the remote specified by QT_CI_BUILD_QT_GIT_REMOTE
|
||||
# - or from code.qt.io
|
||||
# We do a clone, because 'local_clone_url' is usually not a git repo in the CI,
|
||||
# but only a source archive.
|
||||
# On a local build where a ci_ref is not specified, we use the current qt6 checkout
|
||||
# from 'local_clone_url'.
|
||||
set(ci_ref "$ENV{TESTED_MODULE_REVISION_COIN}")
|
||||
if(ci_ref)
|
||||
set(final_clone_url "${code_qt_io_mirror}")
|
||||
set(final_clone_url "${remote_clone_url}")
|
||||
else()
|
||||
set(final_clone_url "${local_clone_url}")
|
||||
endif()
|
||||
@@ -295,9 +301,7 @@ function(setup_qt_sources)
|
||||
SYMBOLIC)
|
||||
endforeach()
|
||||
else()
|
||||
# Adjust its remote url not to be the local url.
|
||||
get_repo_base_url(repo_base_url)
|
||||
set(remote_clone_url "${repo_base_url}/qt/qt5.git")
|
||||
# Adjust its remote url to be the chosen mirror rather the local url.
|
||||
run_command("${prefix}" set_remote_url git remote set-url origin "${remote_clone_url}")
|
||||
|
||||
# Sync to given module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
\+ git submodule init qtsvg
|
||||
Submodule 'qtsvg' \(https://code.qt.io/qt/qtsvg.git\) registered for path 'qtsvg'
|
||||
Submodule 'qtsvg' \(.+/qtsvg.git\) registered for path 'qtsvg'
|
||||
\+ git config commit.template .+tmp.+/qt6/.commit-template
|
||||
\+ git clone --no-checkout https://code.qt.io/qt/qtsvg.git qtsvg
|
||||
\+ git clone --no-checkout .+/qt/qtsvg.git qtsvg
|
||||
Cloning into 'qtsvg'...
|
||||
\+ git config commit.template .+tmp.+/qt6/.commit-template
|
||||
\+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtsvg.git
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
\+ git submodule init qtsvg
|
||||
\+ git config commit.template .+tmp.+/qt6/.commit-template
|
||||
\+ git config remote.origin.url https://code.qt.io/qt/qtsvg.git
|
||||
\+ git config remote.origin.url .+/qt/qtsvg.git
|
||||
\+ git fetch origin
|
||||
\+ git config commit.template .+tmp.+/qt6/.commit-template
|
||||
\+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtsvg.git
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
\+ git submodule init qtshadertools qtsvg
|
||||
Submodule 'qtshadertools' \(https://code.qt.io/qt/qtshadertools.git\) registered for path 'qtshadertools'
|
||||
Submodule 'qtshadertools' \(.+/qt/qtshadertools.git\) registered for path 'qtshadertools'
|
||||
\+ git config commit.template .+tmp.+/qt6/.commit-template
|
||||
\+ git clone --no-checkout https://code.qt.io/qt/qtshadertools.git qtshadertools
|
||||
\+ git clone --no-checkout .+/qt/qtshadertools.git qtshadertools
|
||||
Cloning into 'qtshadertools'...
|
||||
\+ git config commit.template .+tmp.+/qt6/.commit-template
|
||||
\+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtshadertools.git
|
||||
\+ git config remote.gerrit.fetch \+refs/heads/\*:refs/remotes/gerrit/\* /heads/
|
||||
\+ git config remote.origin.url https://code.qt.io/qt/qtsvg.git
|
||||
\+ git config remote.origin.url .+/qt/qtsvg.git
|
||||
\+ git fetch origin
|
||||
\+ git config commit.template .+tmp.+/qt6/.commit-template
|
||||
\+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtsvg.git
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
\+ git config --get initrepository.initialized
|
||||
\+ git submodule init qtshadertools qtsvg qtactiveqt qttools
|
||||
Submodule 'qtactiveqt' \(https://code.qt.io/qt/qtactiveqt.git\) registered for path 'qtactiveqt'
|
||||
Submodule 'qttools' \(https://code.qt.io/qt/qttools.git\) registered for path 'qttools'
|
||||
Submodule 'qtactiveqt' \(.+/qt/qtactiveqt.git\) registered for path 'qtactiveqt'
|
||||
Submodule 'qttools' \(.+/qt/qttools.git\) registered for path 'qttools'
|
||||
\+ git config commit.template .+tmp.+/qt6/.commit-template
|
||||
\+ git config remote.origin.url https://code.qt.io/qt/qtshadertools.git
|
||||
\+ git config remote.origin.url .+/qt/qtshadertools.git
|
||||
\+ git fetch origin
|
||||
\+ git config commit.template .+tmp.+/qt6/.commit-template
|
||||
\+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtshadertools.git
|
||||
\+ git config remote.gerrit.fetch \+refs/heads/\*:refs/remotes/gerrit/\* /heads/
|
||||
\+ git config remote.origin.url https://code.qt.io/qt/qtsvg.git
|
||||
\+ git config remote.origin.url .+/qt/qtsvg.git
|
||||
\+ git fetch origin
|
||||
\+ git config commit.template .+tmp.+/qt6/.commit-template
|
||||
\+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtsvg.git
|
||||
\+ git config remote.gerrit.fetch \+refs/heads/\*:refs/remotes/gerrit/\* /heads/
|
||||
\+ git clone --no-checkout https://code.qt.io/qt/qtactiveqt.git qtactiveqt
|
||||
\+ git clone --no-checkout .+/qt/qtactiveqt.git qtactiveqt
|
||||
Cloning into 'qtactiveqt'...
|
||||
\+ git config commit.template .+tmp.+/qt6/.commit-template
|
||||
\+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtactiveqt.git
|
||||
\+ git config remote.gerrit.fetch \+refs/heads/\*:refs/remotes/gerrit/\* /heads/
|
||||
\+ git clone --no-checkout https://code.qt.io/qt/qttools.git qttools
|
||||
\+ git clone --no-checkout .+/qt/qttools.git qttools
|
||||
Cloning into 'qttools'...
|
||||
\+ git config commit.template .+tmp.+/qt6/.commit-template
|
||||
\+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qttools.git
|
||||
@@ -29,8 +29,8 @@ Submodule path 'qtshadertools': checked out '[0-9a-zA-Z]+'
|
||||
Submodule path 'qtsvg': checked out '[0-9a-zA-Z]+'
|
||||
Submodule path 'qttools': checked out '[0-9a-zA-Z]+'
|
||||
\+ git submodule init src/assistant/qlitehtml
|
||||
Submodule 'src/assistant/qlitehtml' \(https://code.qt.io/playground/qlitehtml.git\) registered for path 'src/assistant/qlitehtml'
|
||||
\+ git clone --no-checkout https://code.qt.io/playground/qlitehtml.git src/assistant/qlitehtml
|
||||
Submodule 'src/assistant/qlitehtml' \(.+/playground/qlitehtml.git\) registered for path 'src/assistant/qlitehtml'
|
||||
\+ git clone --no-checkout .+/playground/qlitehtml.git src/assistant/qlitehtml
|
||||
Cloning into 'src/assistant/qlitehtml'...
|
||||
\+ git submodule update --force --no-fetch
|
||||
Submodule path 'src/assistant/qlitehtml': checked out '[0-9a-zA-Z]+'
|
||||
|
||||
@@ -109,13 +109,27 @@ function(run_suite)
|
||||
set(code_qt_io_mirror "https://code.qt.io/qt/qt5.git")
|
||||
set(gerrit_mirror "https://codereview.qt-project.org/qt/qt5")
|
||||
|
||||
set(coin_git_ip_port "$ENV{QT_COIN_GIT_DAEMON}")
|
||||
set(ci_mirror "git://${coin_git_ip_port}/qt-project")
|
||||
set(ci_clone_url "${ci_mirror}/qt/qt5.git")
|
||||
|
||||
if(coin_git_ip_port)
|
||||
set(remote_clone_url "${ci_clone_url}")
|
||||
else()
|
||||
set(remote_clone_url "${code_qt_io_mirror}")
|
||||
endif()
|
||||
|
||||
# Make a copy of the qt6 repo on which the test will operate on.
|
||||
# On the CI we clone it from the official mirror, because we don't have a git repo, but only
|
||||
# a source archive.
|
||||
# On a local build we use the current qt6 checkout.
|
||||
# On the CI we clone qt6 from one of the following sources, in order:
|
||||
# - the Coin CI git mirror
|
||||
# - or from code.qt.io
|
||||
# We do a clone, because 'local_clone_url' is usually not a git repo in the CI,
|
||||
# but only a source archive.
|
||||
# On a local build where a ci_ref is not specified, we use the current qt6 checkout
|
||||
# from 'local_clone_url'.
|
||||
set(ci_ref "$ENV{TESTED_MODULE_REVISION_COIN}")
|
||||
if(ci_ref)
|
||||
set(final_clone_url "${code_qt_io_mirror}")
|
||||
set(final_clone_url "${remote_clone_url}")
|
||||
else()
|
||||
set(final_clone_url "${local_clone_url}")
|
||||
endif()
|
||||
@@ -129,8 +143,7 @@ function(run_suite)
|
||||
run_suite_command(0012_checkout_ci_qt6_ref git checkout FETCH_HEAD --quiet)
|
||||
endif()
|
||||
|
||||
# Adjust its remote url to be the official mirror rather the local url.
|
||||
set(remote_clone_url "${code_qt_io_mirror}")
|
||||
# Adjust its remote url to be the chosen mirror rather the local url.
|
||||
run_suite_command(0020_set_qt6_remote_url git remote set-url origin "${remote_clone_url}")
|
||||
|
||||
# Ignore certain lines
|
||||
|
||||
Reference in New Issue
Block a user