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

Run tests with CMake Linux build #193

Merged
merged 1 commit into from
Feb 22, 2022
Merged

Conversation

Danielius1922
Copy link
Member

No description provided.

@Danielius1922 Danielius1922 force-pushed the adam/feature/cmake-run-tests branch from 4c11d44 to 066339c Compare February 18, 2022 11:39
@Danielius1922 Danielius1922 marked this pull request as ready for review February 18, 2022 12:48
@WAvdBeek
Copy link
Contributor

the test are not ok:
Running tests...
Test project /home/runner/work/iotivity-lite/iotivity-lite/linuxbuild
Start 1: apitest
1/4 Test #1: apitest .......................... Passed 0.19 sec
Start 2: platformtest
2/4 Test #2: platformtest ..................... Passed 1.02 sec
Start 3: messagingtest
3/4 Test #3: messagingtest .................... Passed 0.02 sec
Start 4: securitytest
4/4 Test #4: securitytest ..................... Passed 0.00 sec

100% tests passed, 0 tests failed out of 4
i am expecting gtest output like:
Running main() from gtest_main.cc
[==========] Running 56 tests from 8 test cases.
[----------] Global test environment set-up.
[----------] 5 tests from UUIDGeneration
[ RUN ] UUIDGeneration.StrToUUIDTest_P
[ OK ] UUIDGeneration.StrToUUIDTest_P (0 ms)
[ RUN ] UUIDGeneration.WildcardStrToUUID
[ OK ] UUIDGeneration.WildcardStrToUUID (0 ms)
[ RUN ] UUIDGeneration.WildcardUUIDToStr
[ OK ] UUIDGeneration.WildcardUUIDToStr (0 ms)
[ RUN ] UUIDGeneration.NonWildcardUUID
[ OK ] UUIDGeneration.NonWildcardUUID (0 ms)
[ RUN ] UUIDGeneration.GenerateType4UUID
[ OK ] UUIDGeneration.GenerateType4UUID (0 ms)
[----------] 5 tests from UUIDGeneration (0 ms total)

[----------] 4 tests from TestCoreResource
[ RUN ] TestCoreResource.InitPlatform_P
[ OK ] TestCoreResource.InitPlatform_P (0 ms)
[ RUN ] TestCoreResource.CoreInitPlatform_P
[ OK ] TestCoreResource.CoreInitPlatform_P (0 ms)
[ RUN ] TestCoreResource.CoreDevice_P
[ OK ] TestCoreResource.CoreDevice_P (1 ms)
[ RUN ] TestCoreResource.CoreGetResource_P
[ OK ] TestCoreResource.CoreGetResource_P (0 ms)
[----------] 4 tests from TestCoreResource (1 ms total)

[----------] 2 tests from OCEndpoints
[ RUN ] OCEndpoints.StringToEndpoint
[ OK ] OCEndpoints.StringToEndpoint (14 ms)
[ RUN ] OCEndpoints.EndpointStringParsePath
[ OK ] OCEndpoints.EndpointStringParsePath (0 ms)
[----------] 2 tests from OCEndpoints (14 ms total)

[----------] 2 tests from TestServerClient
[ RUN ] TestServerClient.ServerStartTest_P
[ OK ] TestServerClient.ServerStartTest_P (0 ms)
[ RUN ] TestServerClient.ServerStopTest_P
[ OK ] TestServerClient.ServerStopTest_P (0 ms)
[----------] 2 tests from TestServerClient (0 ms total)

[----------] 2 tests from TestUnicastRequest
[ RUN ] TestUnicastRequest.SendGetRequest_P
[ OK ] TestUnicastRequest.SendGetRequest_P (0 ms)
[ RUN ] TestUnicastRequest.SendGetRequestTwice_P
[ OK ] TestUnicastRequest.SendGetRequestTwice_P (0 ms)
[----------] 2 tests from TestUnicastRequest (0 ms total)

[----------] 24 tests from TestRep
[ RUN ] TestRep.OCRepEncodedPayloadSize_P
[ OK ] TestRep.OCRepEncodedPayloadSize_P (0 ms)
[ RUN ] TestRep.OCRepEncodedPayloadSizeTooSmall
[ OK ] TestRep.OCRepEncodedPayloadSizeTooSmall (0 ms)
[ RUN ] TestRep.RepToJson_null
[ OK ] TestRep.RepToJson_null (0 ms)
[ RUN ] TestRep.OCRepSetGetNull
[ OK ] TestRep.OCRepSetGetNull (0 ms)
[ RUN ] TestRep.OCRepSetGetDouble
[ OK ] TestRep.OCRepSetGetDouble (0 ms)
[ RUN ] TestRep.OCRepSetGetInt
[ OK ] TestRep.OCRepSetGetInt (0 ms)
[ RUN ] TestRep.OCRepSetGetUint
[ OK ] TestRep.OCRepSetGetUint (0 ms)
[ RUN ] TestRep.OCRepSetGetBool
[ OK ] TestRep.OCRepSetGetBool (0 ms)
[ RUN ] TestRep.OCRepSetGetTextString
[ OK ] TestRep.OCRepSetGetTextString (1 ms)
[ RUN ] TestRep.OCRepSetGetByteString
[ OK ] TestRep.OCRepSetGetByteString (0 ms)
[ RUN ] TestRep.OCRepSetGetIntArray
[ OK ] TestRep.OCRepSetGetIntArray (1 ms)
[ RUN ] TestRep.OCRepAddGetIntArray
[ OK ] TestRep.OCRepAddGetIntArray (0 ms)
[ RUN ] TestRep.OCRepAddGetIntArrayUsingSetKeyAndBeginArray
[ OK ] TestRep.OCRepAddGetIntArrayUsingSetKeyAndBeginArray (0 ms)
[ RUN ] TestRep.OCRepSetGetBoolArray
[ OK ] TestRep.OCRepSetGetBoolArray (0 ms)
[ RUN ] TestRep.OCRepAddGetBoolArray
[ OK ] TestRep.OCRepAddGetBoolArray (0 ms)
[ RUN ] TestRep.OCRepSetGetDoubleArray
[ OK ] TestRep.OCRepSetGetDoubleArray (0 ms)
[ RUN ] TestRep.OCRepAddGetDoubleArray
[ OK ] TestRep.OCRepAddGetDoubleArray (0 ms)
[ RUN ] TestRep.OCRepSetGetObject
[ OK ] TestRep.OCRepSetGetObject (0 ms)
[ RUN ] TestRep.OCRepSetGetObjectArray
[ OK ] TestRep.OCRepSetGetObjectArray (0 ms)
[ RUN ] TestRep.OCRepAddGetByteStringArray
[ OK ] TestRep.OCRepAddGetByteStringArray (0 ms)
[ RUN ] TestRep.OCRepSetGetStringArray
[ OK ] TestRep.OCRepSetGetStringArray (0 ms)
[ RUN ] TestRep.OCRepAddGetStringArray
[ OK ] TestRep.OCRepAddGetStringArray (0 ms)
[ RUN ] TestRep.OCRepRootArrayObject
[ OK ] TestRep.OCRepRootArrayObject (0 ms)
[ RUN ] TestRep.OCRepEncodedPayloadRealloc
[ OK ] TestRep.OCRepEncodedPayloadRealloc (1 ms)
[----------] 24 tests from TestRep (4 ms total)

[----------] 10 tests from TestOcRi
[ RUN ] TestOcRi.GetAppResourceByUri_P
[ OK ] TestOcRi.GetAppResourceByUri_P (0 ms)
[ RUN ] TestOcRi.GetAppResourceByUri_N
[ OK ] TestOcRi.GetAppResourceByUri_N (0 ms)
[ RUN ] TestOcRi.RiGetAppResource_P
[ OK ] TestOcRi.RiGetAppResource_P (0 ms)
[ RUN ] TestOcRi.RiGetAppResource_N
[ OK ] TestOcRi.RiGetAppResource_N (0 ms)
[ RUN ] TestOcRi.RiAllocResource_P
[ OK ] TestOcRi.RiAllocResource_P (0 ms)
[ RUN ] TestOcRi.RiDeleteResource_P
[ OK ] TestOcRi.RiDeleteResource_P (0 ms)
[ RUN ] TestOcRi.RiFreeResourceProperties_P
[ OK ] TestOcRi.RiFreeResourceProperties_P (1 ms)
[ RUN ] TestOcRi.RiAddResource_P
[ OK ] TestOcRi.RiAddResource_P (0 ms)
[ RUN ] TestOcRi.RIGetQueryValue_P
[ OK ] TestOcRi.RIGetQueryValue_P (0 ms)
[ RUN ] TestOcRi.RIQueryExists_P
[ OK ] TestOcRi.RIQueryExists_P (0 ms)
[----------] 10 tests from TestOcRi (1 ms total)

[----------] 7 tests from B64Test
[ RUN ] B64Test.RFC4648_EncodeTestVectors
[ OK ] B64Test.RFC4648_EncodeTestVectors (0 ms)
[ RUN ] B64Test.RFC4648_DecodeTestVectors
[ OK ] B64Test.RFC4648_DecodeTestVectors (0 ms)
[ RUN ] B64Test.DecodeInputMissingPadding
[ OK ] B64Test.DecodeInputMissingPadding (0 ms)
[ RUN ] B64Test.DecodeInputInvalidCharacters
[ OK ] B64Test.DecodeInputInvalidCharacters (0 ms)
[ RUN ] B64Test.DecodeInputInvalidPadding
[ OK ] B64Test.DecodeInputInvalidPadding (0 ms)
[ RUN ] B64Test.encoder_does_not_null_terminate
[ OK ] B64Test.encoder_does_not_null_terminate (0 ms)
[ RUN ] B64Test.EncodeThenDecode
[ OK ] B64Test.EncodeThenDecode (0 ms)
[----------] 7 tests from B64Test (1 ms total)

[----------] Global test environment tear-down
[==========] 56 tests from 8 test cases ran. (21 ms total)
[ PASSED ] 56 tests.
LD_LIBRARY_PATH=./ ./messagingtest
Running main() from gtest_main.cc
[==========] Running 0 tests from 0 test cases.
[==========] 0 tests from 0 test cases ran. (0 ms total)
[ PASSED ] 0 tests.
LD_LIBRARY_PATH=./ ./platformtest
Running main() from gtest_main.cc
[==========] Running 18 tests from 4 test cases.
[----------] Global test environment set-up.
[----------] 3 tests from TestClock
[ RUN ] TestClock.oc_clock_time
[ OK ] TestClock.oc_clock_time (0 ms)
[ RUN ] TestClock.oc_clock_seconds
[ OK ] TestClock.oc_clock_seconds (0 ms)
[ RUN ] TestClock.oc_clock_wait
[ OK ] TestClock.oc_clock_wait (1000 ms)
[----------] 3 tests from TestClock (1001 ms total)

[----------] 5 tests from TestStorage
[ RUN ] TestStorage.oc_storage_config_fail_with_length_over
[ OK ] TestStorage.oc_storage_config_fail_with_length_over (0 ms)
[ RUN ] TestStorage.oc_storage_read_fail
[ OK ] TestStorage.oc_storage_read_fail (0 ms)
[ RUN ] TestStorage.oc_storage_write_fail
[ OK ] TestStorage.oc_storage_write_fail (0 ms)
[ RUN ] TestStorage.oc_storage_config
[ OK ] TestStorage.oc_storage_config (0 ms)
[ RUN ] TestStorage.oc_storage_write
[ OK ] TestStorage.oc_storage_write (0 ms)
[----------] 5 tests from TestStorage (0 ms total)

[----------] 1 test from TestConnectivity_init
[ RUN ] TestConnectivity_init.oc_connectivity_init
[ OK ] TestConnectivity_init.oc_connectivity_init (1 ms)
[----------] 1 test from TestConnectivity_init (1 ms total)

[----------] 9 tests from TestConnectivity
[ RUN ] TestConnectivity.oc_connectivity_get_endpoints
[ OK ] TestConnectivity.oc_connectivity_get_endpoints (1 ms)
[ RUN ] TestConnectivity.oc_add_network_interface_event_callback
[ OK ] TestConnectivity.oc_add_network_interface_event_callback (0 ms)
[ RUN ] TestConnectivity.oc_remove_network_interface_event_callback
[ OK ] TestConnectivity.oc_remove_network_interface_event_callback (0 ms)
[ RUN ] TestConnectivity.oc_remove_network_interface_event_callback_invalid
[ OK ] TestConnectivity.oc_remove_network_interface_event_callback_invalid (0 ms)
[ RUN ] TestConnectivity.handle_network_interface_event_callback
[ OK ] TestConnectivity.handle_network_interface_event_callback (1 ms)
[ RUN ] TestConnectivity.oc_add_session_event_callback
[ OK ] TestConnectivity.oc_add_session_event_callback (0 ms)
[ RUN ] TestConnectivity.oc_remove_session_event_callback
[ OK ] TestConnectivity.oc_remove_session_event_callback (0 ms)
[ RUN ] TestConnectivity.oc_remove_session_event_callback_invalid
[ OK ] TestConnectivity.oc_remove_session_event_callback_invalid (0 ms)
[ RUN ] TestConnectivity.handle_session_event_callback
[ OK ] TestConnectivity.handle_session_event_callback (1 ms)
[----------] 9 tests from TestConnectivity (3 ms total)

[----------] Global test environment tear-down
[==========] 18 tests from 4 test cases ran. (1005 ms total)
[ PASSED ] 18 tests.
LD_LIBRARY_PATH=./ ./securitytest
Running main() from gtest_main.cc
[==========] Running 14 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 3 tests from TestOSCOREHKDF
[ RUN ] TestOSCOREHKDF.HKFDTC1_P
[ OK ] TestOSCOREHKDF.HKFDTC1_P (0 ms)
[ RUN ] TestOSCOREHKDF.HKFDTC2_P
[ OK ] TestOSCOREHKDF.HKFDTC2_P (0 ms)
[ RUN ] TestOSCOREHKDF.HKFDTC3_P
[ OK ] TestOSCOREHKDF.HKFDTC3_P (0 ms)
[----------] 3 tests from TestOSCOREHKDF (0 ms total)

[----------] 11 tests from TestOSCORE
[ RUN ] TestOSCORE.ClientKDFWithSalt_P
[ OK ] TestOSCORE.ClientKDFWithSalt_P (0 ms)
[ RUN ] TestOSCORE.ServerKDFWithSalt_P
[ OK ] TestOSCORE.ServerKDFWithSalt_P (0 ms)
[ RUN ] TestOSCORE.ClientKDFWithoutSalt_P
[ OK ] TestOSCORE.ClientKDFWithoutSalt_P (0 ms)
[ RUN ] TestOSCORE.ServerKDFWithoutSalt_P
[ OK ] TestOSCORE.ServerKDFWithoutSalt_P (0 ms)
[ RUN ] TestOSCORE.ClientKDFWithIDContext_P
[ OK ] TestOSCORE.ClientKDFWithIDContext_P (0 ms)
[ RUN ] TestOSCORE.ServerKDFWithIDContext_P
[ OK ] TestOSCORE.ServerKDFWithIDContext_P (0 ms)
[ RUN ] TestOSCORE.ClientRequest1_P
[ OK ] TestOSCORE.ClientRequest1_P (0 ms)
[ RUN ] TestOSCORE.ClientRequest2_P
[ OK ] TestOSCORE.ClientRequest2_P (0 ms)
[ RUN ] TestOSCORE.ClientRequest3_P
[ OK ] TestOSCORE.ClientRequest3_P (0 ms)
[ RUN ] TestOSCORE.ServerResponse1_P
[ OK ] TestOSCORE.ServerResponse1_P (0 ms)
[ RUN ] TestOSCORE.ServerResponse2_P
[ OK ] TestOSCORE.ServerResponse2_P (0 ms)
[----------] 11 tests from TestOSCORE (0 ms total)

[----------] Global test environment tear-down
[==========] 14 tests from 2 test cases ran. (0 ms total)
[ PASSED ] 14 tests.

@Danielius1922
Copy link
Member Author

the test are not ok: Running tests... Test project /home/runner/work/iotivity-lite/iotivity-lite/linuxbuild Start 1: apitest 1/4 Test #1: apitest .......................... Passed 0.19 sec Start 2: platformtest 2/4 Test #2: platformtest ..................... Passed 1.02 sec Start 3: messagingtest 3/4 Test #3: messagingtest .................... Passed 0.02 sec Start 4: securitytest 4/4 Test #4: securitytest ..................... Passed 0.00 sec

100% tests passed, 0 tests failed out of 4 i am expecting gtest output like:
...

Yeah, that's verbose output, I'll change the config then.

@Danielius1922 Danielius1922 force-pushed the adam/feature/cmake-run-tests branch from 066339c to 6b2d175 Compare February 18, 2022 16:13
@WAvdBeek WAvdBeek merged commit 8b7c181 into master Feb 22, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Feb 22, 2022
@Danielius1922 Danielius1922 deleted the adam/feature/cmake-run-tests branch September 8, 2022 10:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

note: the cmake does now build the test executables but does not run them
4 participants