From 3e46e3c26783930b37310604dd14b62dce23dccb Mon Sep 17 00:00:00 2001 From: Vadim Godunko Date: Fri, 5 Jul 2024 16:37:12 +0400 Subject: [PATCH 1/2] Windows CI --- .gitlab-ci.yml | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2d16ed2f..d036830c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,6 @@ +include: + - component: $CI_SERVER_FQDN/eng/gitlab-templates/windows-ci@main + variables: # The common part of the URL for cloning from within a CI GIT_CLONE_BASE: https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT} @@ -143,11 +146,7 @@ build_and_test_dev: junit: .xunit-logs/*.xml -build_and_test: - services: - - image:pe-base - - cpu:8 - - mem:16 +.build_and_test: stage: build_and_test rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' @@ -159,6 +158,34 @@ build_and_test: - anod test vss $ACI_TRACK_QUALIFIER --latest - testsuite_reports +build_and_test_linux: + extends: .build_and_test + services: + - image:pe-base + - cpu:8 + - mem:16 + +build_and_test_windows: + extends: .build_and_test + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + when: manual + before_script: + - export CYGWIN=nodosfilewarning # Remove confusing Cygwin warning + - set -o igncr # Remove trailing ^M in Cygwin + - export SHELLOPTS + - export PYTHONIOENCODING=utf-8:surrogateescape + services: + - image:e3-windows-core-2022 + - cpu:8 + - platform:x86_64-windows-2022 + +build_and_test_linux: + extends: .build_and_test + services: + - image:pe-base + - cpu:8 + - mem:16 build_gnatdoc: services: From 63fa6b261c104d5f2f834778572f10b1005f41fd Mon Sep 17 00:00:00 2001 From: Vadim Godunko Date: Mon, 8 Jul 2024 06:26:14 +0000 Subject: [PATCH 2/2] Use modified GDB script on Windows. --- testsuite/gdbpp/{gdbinit => gdbinit.posix} | 0 testsuite/gdbpp/gdbinit.windows | 31 ++++++++++++++++++++++ testsuite/gdbpp/test.sh | 6 ++++- 3 files changed, 36 insertions(+), 1 deletion(-) rename testsuite/gdbpp/{gdbinit => gdbinit.posix} (100%) create mode 100644 testsuite/gdbpp/gdbinit.windows diff --git a/testsuite/gdbpp/gdbinit b/testsuite/gdbpp/gdbinit.posix similarity index 100% rename from testsuite/gdbpp/gdbinit rename to testsuite/gdbpp/gdbinit.posix diff --git a/testsuite/gdbpp/gdbinit.windows b/testsuite/gdbpp/gdbinit.windows new file mode 100644 index 00000000..5bf6b3f4 --- /dev/null +++ b/testsuite/gdbpp/gdbinit.windows @@ -0,0 +1,31 @@ +set logging redirect on +set logging file NUL +set logging enabled on +# Redirecting of the output to file and enable logging send all GDB's output +# into the file. Logging is disabled a bit later when output of the +# 'output'/'echo' commands need to be output to the standard output to check +# with expected results. + +source vss_pp.py + +start +set charset UTF-8 +next +next +next +next +next + +set logging enabled off +output ss1 +echo \n +output us1 +echo \n +output vsn +echo \n +output vs1 +echo \n +output vs2 +echo \n +output vi1 +echo \n diff --git a/testsuite/gdbpp/test.sh b/testsuite/gdbpp/test.sh index a87bb260..91a2c87c 100644 --- a/testsuite/gdbpp/test.sh +++ b/testsuite/gdbpp/test.sh @@ -1,2 +1,6 @@ gprbuild -q -P test.gpr -gdb --batch --command=gdbinit --directory=$VSS_GDBPP .objs/main +if [ "$OS" = "Windows_NT" ]; then + gdb --batch --command=gdbinit.windows --directory=$VSS_GDBPP .objs/main +else + gdb --batch --command=gdbinit.posix --directory=$VSS_GDBPP .objs/main +fi