Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Enable unit tests for -O3 and -O2 and enable this on the CI #1987

Open
RevoluPowered opened this issue Dec 15, 2020 · 3 comments
Open

Enable unit tests for -O3 and -O2 and enable this on the CI #1987

RevoluPowered opened this issue Dec 15, 2020 · 3 comments

Comments

@RevoluPowered
Copy link

Describe the project you are working on

We are working on an iOS game.

Describe the problem or limitation you are having in your project

We have a bug with -O3 optimizations breaking GDScript on iOS it goes away with -O2.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

We should make all unit tests run on each type of binary release:

  • O3 (release)
  • O2 (release_debug)
  • NO opt (debug)

This will mean these bugs can be caught with different optimization levels.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

We would just add some logic to the CI to trigger this to use O2 and O3 respectively.

If this enhancement will not be used often, can it be worked around with a few lines of script?

No.

Is there a reason why this should be core and not an add-on in the asset library?

It is core.

@RevoluPowered
Copy link
Author

RevoluPowered commented Dec 15, 2020

O3 builds indeed do not pass all tests :)

Using godotengine/godot#44398 to run these tests

scons tools=no target=release

  values: REQUIRE_FALSE( 0 != 1 )
  logged: "Invalid property setter argument count: 'AcceptDialog.dialog_text'."

testing method bind
===============================================================================
[doctest] test cases:    270 |    269 passed | 1 failed | 1 skipped
[doctest] assertions: 158164 | 158163 passed | 1 failed |

@RevoluPowered
Copy link
Author

(-O2) tools = yes target=release_debug

[doctest] doctest version is "2.4.1"
[doctest] run with "--help" for options
===============================================================================
tests/test_class_db.h:814:
TEST SUITE: [ClassDB]
TEST CASE:  [ClassDB] Add exposed classes, builtin types, and global enums

tests/test_class_db.h:705: WARNING: WARN_FALSE( (method_conflict || exposed_class.find_method_by_name(signal.name)) ) is NOT correct!
  values: WARN_FALSE( true )
  logged: Signal name conflicts with method: 'BaseButton.pressed.

tests/test_class_db.h:705: WARNING: WARN_FALSE( (method_conflict || exposed_class.find_method_by_name(signal.name)) ) is NOT correct!
  values: WARN_FALSE( true )
  logged: Signal name conflicts with property: 'Control.minimum_size_changed.

tests/test_class_db.h:473: MESSAGE: Ignoring class 'GDScriptEditorTranslationParserPlugin' because it's not exposed.

tests/test_class_db.h:473: MESSAGE: Ignoring class 'IP_Unix' because it's not exposed.

tests/test_class_db.h:705: WARNING: WARN_FALSE( (method_conflict || exposed_class.find_method_by_name(signal.name)) ) is NOT correct!
  values: WARN_FALSE( true )
  logged: Signal name conflicts with property: 'Input.joy_connection_changed.

tests/test_class_db.h:705: WARNING: WARN_FALSE( (method_conflict || exposed_class.find_method_by_name(signal.name)) ) is NOT correct!
  values: WARN_FALSE( true )
  logged: Signal name conflicts with property: 'ProximityGroup3D.broadcast.

tests/test_class_db.h:479: MESSAGE: Ignoring class 'RootMotionView' because it's not enabled.

tests/test_class_db.h:705: WARNING: WARN_FALSE( (method_conflict || exposed_class.find_method_by_name(signal.name)) ) is NOT correct!
  values: WARN_FALSE( true )
  logged: Signal name conflicts with method: 'TouchScreenButton.pressed.

testing method bind
===============================================================================
[doctest] test cases:    271 |    271 passed | 0 failed | 1 skipped
[doctest] assertions: 184868 | 184868 passed | 0 failed |
[doctest] Status: SUCCESS!

@RevoluPowered
Copy link
Author

tools=yes target=debug

[doctest] doctest version is "2.4.1"
[doctest] run with "--help" for options
===============================================================================
tests/test_class_db.h:814:
TEST SUITE: [ClassDB]
TEST CASE:  [ClassDB] Add exposed classes, builtin types, and global enums

tests/test_class_db.h:705: WARNING: WARN_FALSE( (method_conflict || exposed_class.find_method_by_name(signal.name)) ) is NOT correct!
  values: WARN_FALSE( true )
  logged: Signal name conflicts with method: 'BaseButton.pressed.

tests/test_class_db.h:705: WARNING: WARN_FALSE( (method_conflict || exposed_class.find_method_by_name(signal.name)) ) is NOT correct!
  values: WARN_FALSE( true )
  logged: Signal name conflicts with property: 'Control.minimum_size_changed.

tests/test_class_db.h:473: MESSAGE: Ignoring class 'GDScriptEditorTranslationParserPlugin' because it's not exposed.

tests/test_class_db.h:473: MESSAGE: Ignoring class 'IP_Unix' because it's not exposed.

tests/test_class_db.h:705: WARNING: WARN_FALSE( (method_conflict || exposed_class.find_method_by_name(signal.name)) ) is NOT correct!
  values: WARN_FALSE( true )
  logged: Signal name conflicts with property: 'Input.joy_connection_changed.

tests/test_class_db.h:705: WARNING: WARN_FALSE( (method_conflict || exposed_class.find_method_by_name(signal.name)) ) is NOT correct!
  values: WARN_FALSE( true )
  logged: Signal name conflicts with property: 'ProximityGroup3D.broadcast.

tests/test_class_db.h:479: MESSAGE: Ignoring class 'RootMotionView' because it's not enabled.

tests/test_class_db.h:705: WARNING: WARN_FALSE( (method_conflict || exposed_class.find_method_by_name(signal.name)) ) is NOT correct!
  values: WARN_FALSE( true )
  logged: Signal name conflicts with method: 'TouchScreenButton.pressed.

testing method bind
===============================================================================
[doctest] test cases:    271 |    271 passed | 0 failed | 1 skipped
[doctest] assertions: 184868 | 184868 passed | 0 failed |
[doctest] Status: SUCCESS!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants