Skip to content
DimRochettePublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

gtest-demo

Basic Gtest demo project to reproduce bug in test explorer in vs2026

Description

root

CMakeLists.txt that create the project and set some basic options CMakesettings.json to handle win Release/Debug and Linux Release/Debug

src

small library with only 2 functions

test

2 files to test 2 functions from library. It use fetchcontent to get Gtest.

ubuntuvs

A dockerfile and its docker-compose.yml to create a linux container with some build tools.

Setup

Create the container from ubuntuvs

cd ubuntuvs
docker compose --profile ubuntuvs up -d

Then open visual studio and create connection to this container

name : localhost
port : 5000
user : aaa
password : aaa

Reproducting the bug

open the solution as cmake project in visual 2026 open the test explorer windows select one of the linux target generate everything run the unit tests

output from test windows

Démarrage de la découverte de tests
========== Fin de la découverte de tests : 2 tests trouvés en 635,7 ms ==========
Démarrage de la série de tests
Connexion impossible au système distant : Connexion impossible au système distant, ou perte de la connexion.
Connexion impossible au système distant : -1440107451;localhost (username=aaa, port=5000, authentication=Password)
========== Série de tests achevée : 0 tests (0 réussi(s), 0 non réussi(s), 0 ignoré(s)) exécutés en 177 ms ==========

vs2026

Works in vs 2022

open same solution use same container compile and run the linux tests

output from test windows

========== Test discovery finished: 2 Tests found in 2,1 s ==========
Génération de projets de test
========== Starting test run ==========
========== Test run finished: 2 Tests (2 Passed, 0 Failed, 0 Skipped) run in 383 ms ==========

vs2022

Matrix of usecases

Visual Studio Target test explorer run test executable
2022 win release ✅ ✅
2022 win debug ✅ ✅
2022 linux release ✅ ✅
2022 linux debug ✅ ✅
2026 win release ✅ ✅
2026 win debug ✅ ✅
2026 linux release ❌ ✅
2026 linux debug ❌ ✅

extra info

We test our solution with vs2026 and test always failed. So the discrepency is probably since first release of vs2026. We thought it was caused by our CI with docker using new compiler/cmake vcpkg with private registry, multiple layers of docker images. We finally recreate this project without any dependency from our stack and our issue is reproduced.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages