Skip to content

[Test] Test runner doesn't seem to honor weak/strong flag #42370

@leafpetersen

Description

@leafpetersen

See detailed transcript below, but in summary:

Running test.py on a test with --nnbd=weak passed as an argument results in this command line:

DART_CONFIGURATION=ReleaseX64 xcodebuild/ReleaseX64/dart --enable-experiment=non-nullable --ignore-unrecognized-flags --packages=/Users/leafp/src/dart-repo/sdk/.packages /Users/leafp/src/dart-repo/sdk/tests/language/nnbd/normalization/generic_function_type_object_normalization_test.dart

Note that this command line does not set the mode to weak mode.

Running with --nnbd=strong results in the same command line.

cc @munificent @sortie

leafp-macbookpro:sdk leafp$ python tools/test.py -c dartk -m release --enable-experiment=non-nullable --nnbd=weak tests/language/nnbd/normalization/generic_function_type_object_normalization_test.dart 
Test configuration:
    custom configuration(architecture: x64, compiler: dartk, mode: release, runtime: vm, system: mac, nnbd: weak, enable-experiment: [non-nullable])
Suites tested: language

FAILED: dartk-vm release_x64 language/nnbd/normalization/generic_function_type_object_normalization_test
Expected: Pass
Actual: RuntimeError

--- Command "vm" (took 602ms):
DART_CONFIGURATION=ReleaseX64 xcodebuild/ReleaseX64/dart --enable-experiment=non-nullable --ignore-unrecognized-flags --packages=/Users/leafp/src/dart-repo/sdk/.packages /Users/leafp/src/dart-repo/sdk/tests/language/nnbd/normalization/generic_function_type_object_normalization_test.dart

exit code:
255

stderr:
Unhandled exception:
Expect.notEquals(unexpected: <<R0 extends Future<Never>, R1 extends Never, R2 extends Null>() => Null>, actual:<<R0 extends Future<Never>, R1 extends Never, R2 extends Null>() => Null>) fails.
#0      Expect._fail (package:expect/expect.dart:685:5)
#1      Expect.notEquals (package:expect/expect.dart:306:5)
#2      checkNotEquals2 (file:///Users/leafp/src/dart-repo/sdk/tests/language/nnbd/normalization/type_builder.dart:136:10)
#3      checkTypeNotEquals2 (file:///Users/leafp/src/dart-repo/sdk/tests/language/nnbd/normalization/generic_function_type_object_normalization_test.dart:22:3)
#4      neverBoundTests (file:///Users/leafp/src/dart-repo/sdk/tests/language/nnbd/normalization/generic_function_type_object_normalization_test.dart:175:5)
#5      main (file:///Users/leafp/src/dart-repo/sdk/tests/language/nnbd/normalization/generic_function_type_object_normalization_test.dart:199:3)
#6      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:301:19)
#7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

--- Re-run this test:
python tools/test.py -m release -c dartk --nnbd weak --enable-experiment non-nullable language/nnbd/normalization/generic_function_type_object_normalization_test
[00:00 | 100% | +    0 | -    1]

=== 0 tests passed, 1 failed ===

Metadata

Metadata

Assignees

Labels

area-testCross-cutting test issues (use area- labels for specific failures; not used for package:test).

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions