Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 904124

Summary: games-strategy/freeorion-0.5 fails tests
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Gentoo Games <games>
Status: CONFIRMED ---    
Severity: normal CC: alexey+gentoo, ionen, O01eg, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
1-LastTest.log

Description Agostino Sarubbo gentoo-dev 2023-04-10 12:54:17 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: games-strategy/freeorion-0.5 fails tests.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2023-04-10 12:54:19 UTC
CC'ing also the author of the commit (caf3802e7acd436a4a2c2b6bc2991921194b51e4)
Comment 2 Agostino Sarubbo gentoo-dev 2023-04-10 12:54:20 UTC
Created attachment 859803 [details]
build.log

build log and emerge --info
Comment 3 Agostino Sarubbo gentoo-dev 2023-04-10 12:54:22 UTC
Created attachment 859804 [details]
1-LastTest.log

1-LastTest.log
Comment 4 Agostino Sarubbo gentoo-dev 2023-04-10 12:54:23 UTC
Error(s) that match a know pattern:


	  2 - TestPythonParser (Failed)
	  3 - SmokeTestGame (Failed)
	  4 - SmokeTestHostless (Failed)
-- Could NOT find CPPCheck (missing: CPPCHECK_EXECUTABLE) 
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Could NOT find Flake8 (missing: FLAKE8_EXECUTABLE) 
fatal: not a git repository (or any parent up to mount point /var/tmp)
Comment 5 Oleg 2023-04-13 11:17:14 UTC
I suppose it happends because we call tests on CI with `cmake --build . --target unittest` which calls each test in separate process while here binaries with multiple tests are called once, which leads to issues with multiple initialization of global variables.
Comment 6 Alexey 2023-04-13 20:15:59 UTC
Re CPPCheck, Flake8

They are testing code quality, and probably the check/ subdir should be disabled altogether in the ebuild. This is only useful for upstream CI.

> fatal: not a git repository (or any parent up to mount point /var/tmp)

This is an internal output of git which is run by cmake/make_versioncpp.py, and its failure is ignored by the script.

> cmake --build . --target unittest

Here it's called like this: ctest -j 43 --test-load 999 -j1, which still produces multiple binaries (gg_unittest, fo_unittest_parse, fo_unittest_util, fo_systemtest_game), not one.
Comment 7 Ionen Wolkens gentoo-dev 2024-05-05 21:42:53 UTC
Tried to reproduce this (about to bump 0.5.0.1) but can't reproduce with either 0.5 nor 0.5.0.1 (everything passes).

Is there something obvious I'm missing to reproduce given this "CONFIRMED"? Is it just a race despite -j1 and I'm just not hitting it?
Comment 8 Larry the Git Cow gentoo-dev 2024-05-05 23:44:10 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d963d8e8907e5c9d3ddc2795b6266e3c13b6368

commit 1d963d8e8907e5c9d3ddc2795b6266e3c13b6368
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-05-05 22:10:24 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-05-05 23:43:47 +0000

    games-strategy/freeorion: add 0.5.0.1, enable py3.12
    
    Tests pass (for me) with all python versions, albeit there is
    bug #904124 that implies they may not and unsure what it is
    about. Will see if CI can reproduce again with this I guess.
    
    Other changes:
    - replace ccache patch by a cmake option
    - drop the check directory wrt bug #904124 to ensure no flaky
      behavior if dependencies are found
    - filter-lto for now due to: DesignWnd.cpp:43:8: error: type
    'struct Availability' violates the C++ One Definition Rule
      (this was an issue in 0.5 as well)
    
    Bug: https://bugs.gentoo.org/904124
    Closes: https://bugs.gentoo.org/929597
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 games-strategy/freeorion/Manifest                 |   1 +
 games-strategy/freeorion/freeorion-0.5.0.1.ebuild | 119 ++++++++++++++++++++++
 2 files changed, 120 insertions(+)