Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]: googletest-output-test fails #4720

Open
mtelka opened this issue Feb 7, 2025 · 0 comments
Open

[Bug]: googletest-output-test fails #4720

mtelka opened this issue Feb 7, 2025 · 0 comments

Comments

@mtelka
Copy link

mtelka commented Feb 7, 2025

Describe the issue

I'm running tests for googletest 1.15.2 and I see one failure (test results with self.maxDiff = None):

55/63 Test: googletest-output-test
Command: "/usr/bin/python3.9" "/data/builds/oi-userland/components/developer/googletest/googletest-1.15.2/googletest/test/googletest-output-test.py" "--build_dir=/data/builds/oi-userland/components/developer/googletest/build/amd64/googletest" "--no_stacktrace_support"
Directory: /data/builds/oi-userland/components/developer/googletest/build/amd64/googletest
"googletest-output-test" start time: Feb 07 02:17 CET
Output:
----------------------------------------------------------
F
======================================================================
FAIL: testOutput (__main__.GTestOutputTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/builds/oi-userland/components/developer/googletest/googletest-1.15.2/googletest/test/googletest-output-test.py", line 363, in testOutput
    self.assertEqual(normalized_golden, normalized_actual)
AssertionError: 'The [29182 chars]class, so mixing TEST_F and TEST in the same t[13923 chars]s.\n' != 'The [29182 chars]class.  However, in test suite BadDynamicFixtu[14000 chars]s.\n'
  The non-test part of the code is expected to have 2 failures.

  googletest-output-test_.cc:#: Failure
  Value of: false
    Actual: false
  Expected: true

  googletest-output-test_.cc:#: Failure
  Expected equality of these values:
    2
    3

  ^[[0;32m[==========] ^[[mRunning 90 tests from 43 test suites.
  ^[[0;32m[----------] ^[[mGlobal test environment set-up.
  FooEnvironment::SetUp() called.
  BarEnvironment::SetUp() called.

[... snip ...]

  DynamicFixture::TearDown
  ~DynamicFixture()
  ^[[0;32m[       OK ] ^[[mBadDynamicFixture1.FixtureBase
  ^[[0;32m[ RUN      ] ^[[mBadDynamicFixture1.TestBase
  DynamicFixture()
  gtest.cc:#: Failure
  Failed
  All tests in the same test suite must use the same test fixture
- class, so mixing TEST_F and TEST in the same test suite is
- illegal.  In test suite BadDynamicFixture1,
- test FixtureBase is defined using TEST_F but
- test TestBase is defined using TEST.  You probably
- want to change the TEST to TEST_F or move it to another test
- case.
+ class.  However, in test suite BadDynamicFixture1,
+ you defined test FixtureBase and test TestBase
+ using two different test fixture classes.  This can happen if
+ the two classes are from different namespaces or translation
+ units and have the same name.  You should probably rename one
+ of the classes to put the tests into different test suites.

  ~DynamicFixture()
  ^[[0;31m[  FAILED  ] ^[[mBadDynamicFixture1.TestBase
  DynamicFixture::TearDownTestSuite
  ^[[0;32m[----------] ^[[m? tests from BadDynamicFixture2
  DynamicFixture::SetUpTestSuite
  ^[[0;32m[ RUN      ] ^[[mBadDynamicFixture2.FixtureBase
  DynamicFixture()

[... snip ...]

Steps to reproduce the problem

Run tests on OpenIndiana.

What version of GoogleTest are you using?

1.15.2

What operating system and version are you using?

OpenIndiana Hipster

What compiler and version are you using?

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/gcc/14/lib/gcc/x86_64-pc-solaris2.11/14.2.0/lto-wrapper
Target: x86_64-pc-solaris2.11
Configured with: /jenkins/jobs/oi-userland/workspace/components/developer/gcc-14/gcc-releases-gcc-14.2.0/configure CC=/usr/gcc/13/bin/gcc CXX=/usr/gcc/13/bin/g++ F77=/usr/gcc/13/bin/gfortran FC=/usr/gcc/13/bin/gfortran CFLAGS= CXXFLAGS= FFLAGS='  -O3 ' FCFLAGS=-O2 LDFLAGS=-RPT/lib PKG_CONFIG_PATH=/usr/mariadb/10.6/lib/amd64/pkgconfig:/usr/openssl/3.1/lib/64/pkgconfig:/usr/lib/amd64/pkgconfig:/usr/lib/pkgconfig --prefix=/usr/gcc/14 --mandir=/usr/gcc/14/share/man --bindir=/usr/gcc/14/bin --includedir=/usr/include --infodir=/usr/share/info --libdir=/usr/gcc/14/lib --libexecdir=/usr/gcc/14/libexec --localedir=/usr/gcc/14/share/locale --localstatedir=/var --sbindir=/usr/gcc/14/sbin --sysconfdir=/etc --sbindir=/usr/gcc/14/bin --libdir=/usr/gcc/14/lib --libexecdir=/usr/gcc/14/lib --host x86_64-pc-solaris2.11 --build x86_64-pc-solaris2.11 --target x86_64-pc-solaris2.11 --with-pkgversion='OpenIndiana 14.2.0-oi-1' --with-bugurl=https://bugs.openindiana.org --without-gnu-ld --with-ld=/usr/bin/ld --with-build-time-tools=/usr/gnu/x86_64-pc-solaris2.11/bin --with-gnu-as --with-as=/usr/bin/gas LDFLAGS=-R/usr/gcc/14/lib --with-ld=/usr/bin/ld --without-gnu-ld --with-as=/usr/bin/gas --with-gnu-as --with-build-time-tools=/usr/gnu//bin --with-build-config=no --enable-languages=c,c++,fortran,go,objc --enable-shared --with-system-zlib --enable-plugins --enable-__cxa_atexit --enable-initfini-array --with-diagnostics-urls=auto-if-env enable_frame_pointer=yes
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.0 (OpenIndiana 14.2.0-oi-1) 
$ clang -v
clang version 19.1.7 (https://github.com/OpenIndiana/oi-userland.git 6e87c3d2a1014ce57bad58539315de98daac6e06)
Target: x86_64-pc-solaris2.11
Thread model: posix
InstalledDir: /usr/clang/19/bin
Found candidate GCC installation: /usr/gcc/14/lib/gcc/x86_64-pc-solaris2.11/14
Found candidate GCC installation: /usr/gcc/14/lib/gcc/x86_64-pc-solaris2.11/14.2.0
Selected GCC installation: /usr/gcc/14/lib/gcc/x86_64-pc-solaris2.11/14
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
$

What build system are you using?

$ cmake --version
cmake version 3.31.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).
$

Additional context

No response

@mtelka mtelka changed the title [Bug]: googletest-output-test fails [Bug]: googletest-output-test fails Feb 7, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant