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

Unittest: add a test folder v1 #150

Closed
wants to merge 5 commits into from

Conversation

audoan99
Copy link
Contributor

This folder consists of 3 parts:

  • client: test ivi-layermanagement-api (ilmCommon, ilmControl, ilmInput).
  • server: test ivi-id-agent-modules, ivi-input-modules and weston-ivi-shell.
  • common: contains common fake APIs for both client and server.

Struct of tests:
image

@audoan99 audoan99 changed the title Unit test: add a test folder v1 Unittest: add a test folder v1 Feb 24, 2023
unittest/client/src/ilm_common_unittests.cpp Outdated Show resolved Hide resolved
unittest/client/src/ilm_common_unittests.cpp Outdated Show resolved Hide resolved
unittest/client/src/ilm_common_unittests.cpp Outdated Show resolved Hide resolved
unittest/client/src/ilm_common_unittests.cpp Outdated Show resolved Hide resolved
@audoan99 audoan99 force-pushed the devel/unit_test branch 2 times, most recently from a93e13e to 18d1b4a Compare March 31, 2023 06:21
@audoan99 audoan99 force-pushed the devel/unit_test branch 3 times, most recently from f1bfbc7 to af4fbb8 Compare April 6, 2023 08:17
@audoan99
Copy link
Contributor Author

audoan99 commented Apr 6, 2023

Tested-by: Au Doan Ngoc [email protected]

audoan99 and others added 2 commits April 21, 2023 15:48
This folder consists of 3 parts:
- client: test ivi-layermanagement-api (ilmCommon, ilmControl, ilmInput).
- server: test ivi-id-agent-modules, ivi-input-modules and weston-ivi-shell.
- common: contains common fake APIs for both client and server.

Signed-off-by: Au Doan Ngoc <[email protected]>
Add the unittest folder to cmake file.

Signed-off-by: Au Doan Ngoc <[email protected]>
To build with unittests, need to use flag BUILD_ILM_UNIT_TESTS.

Signed-off-by: Au Doan Ngoc <[email protected]>
	These unittest are written for weston 9. Now weston version is 12

	In this commit, let disable some testcase called removed APIs,
	delete get function pointer of private function in source code,
	let include directly source file and call private function
	directly.

Signed-off-by: Phung Van Chien <[email protected]>
	Screenshot feature have new public APIs. Some exist APIs are
	  changed with new logic and mechanism
	Create unittest for new APIs, update out-of-date testcase.

Signed-off-by: Phung Van Chien <[email protected]>
############################################################################

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning messages when configuring of cmake.
change to: 65fa39b


CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
cmake_policy(SET CMP0046 OLD)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning messages when configuring of cmake.
65fa39b

)

LINK_DIRECTORIES(
${WAYLAND_CLIENT_LIBRARY_DIRS}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no binaries link to libwayland-client.so, don't need to keep this link

deinit_ctx_list_content();
}

void init_ctx_list_content()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider to divide this function to sub-functions, for supporting add new surface, seat, layer, and screen. it will be cleaner than currently.


ASSERT_EQ(1, wl_proxy_marshal_flags_fake.call_count);
ASSERT_EQ(1, wl_display_roundtrip_queue_fake.call_count);
ASSERT_EQ(mp_failureResult[0], wl_display_roundtrip_queue_fake.return_val_history[0]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider to remove the check the result, that were faked with SET_RETURN_SEQ

@chienpv1
Copy link
Contributor

To make more convenient to review and update, all changes will continue to be updated in PR_180. This PR will be closed.

@efriedrich efriedrich closed this Nov 3, 2023
@efriedrich
Copy link
Collaborator

please just ensure the useful content is also part of #180 and we will continue there....

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

Successfully merging this pull request may close these issues.

5 participants