Skip to content

ios_debug_sim_unopt, ios_debug_sim_unopt_arm64 tests are built with NDEBUG defined #156166

@cbracken

Description

@cbracken

While testing locally, I noticed that [IOSSurfaceNoopTest testCreateSurface] was (correctly) failing because nullptr was being passed through an FML_DCHECK check. Fix in flutter/engine#55621

However, the question is how this test was passing on CI. I sent a test patch to log whether NDEBUG was set or not in flutter/engine#55626 and it was indeed set. Given that this is a debug build; I'd have expected DEBUG set and NDEBUG not set.

For ios_debug_sim_unopt:
https://ci.chromium.org/ui/p/flutter/builders/try/Mac%20Engine%20Drone/1210053/overview

Test Suite 'IOSSurfaceNoopTest' started at 2024-10-03 12:06:10.179.
Test Case '-[IOSSurfaceNoopTest testCreateSurface]' started.
2024-10-03 12:06:10.183176-0700 IosUnitTests[19489:122395] ============================= NDEBUG is defined
Test Case '-[IOSSurfaceNoopTest testCreateSurface]' passed (0.007 seconds).
Test Suite 'IOSSurfaceNoopTest' passed at 2024-10-03 12:06:10.192.
	 Executed 1 test, with 0 failures (0 unexpected) in 0.007 (0.014) seconds

For iOS_debug_sim_unopt_arm64:
https://ci.chromium.org/ui/p/flutter/builders/try/Mac%20Engine%20Drone/1210055/overview

Test Suite 'IOSSurfaceNoopTest' started at 2024-10-03 12:02:01.021.
Test Case '-[IOSSurfaceNoopTest testCreateSurface]' started.
2024-10-03 12:02:01.023299-0700 IosUnitTests[12579:84991] ============================= NDEBUG is defined
Test Case '-[IOSSurfaceNoopTest testCreateSurface]' passed (0.003 seconds).
Test Suite 'IOSSurfaceNoopTest' passed at 2024-10-03 12:02:01.026.
	 Executed 1 test, with 0 failures (0 unexpected) in 0.003 (0.005) seconds

A bit of further debugging shows that DEBUG is not defined, as one would expect if NDEBUG is defined, so that's at least we're consistent in that way.

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projecta: tests"flutter test", flutter_test, or one of our testsengineflutter/engine related. See also e: labels.platform-iosiOS applications specificallyteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions