Disable MC/GA_valid_request_and_cancel_P test on emulator 06/318606/2
authorDaniel Kita <d.kita@samsung.com>
Thu, 3 Oct 2024 07:58:55 +0000 (09:58 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Thu, 3 Oct 2024 12:06:06 +0000 (14:06 +0200)
No waiting for communication with the device
causes response callback to be called immediately
which makes wauthn_cancel() return
WAUTHN_ERROR_NOT_ALLOWED

Change-Id: Ic5478534f8327f4ed5de40eb21b07f2df22debb5

CMakeLists.txt
packaging/webauthn.spec
tests/webauthn-client-test.cpp

index 8e730e4af1e42d993e5fc311ed5d9aef521b4112..6701f91345fb33366d4389c796f3c616095ef185 100644 (file)
@@ -51,6 +51,10 @@ IF(NOT DEFINED COVERAGE_DIR)
     SET(COVERAGE_DIR "${SHARE_INSTALL_PREFIX}/${PROJECT_NAME}-coverage")
 ENDIF(NOT DEFINED COVERAGE_DIR)
 
+IF (EMULATOR_BUILD MATCHES 1)
+    ADD_COMPILE_DEFINITIONS(EMULATOR_BUILD=1)
+ENDIF (EMULATOR_BUILD MATCHES 1)
+
 # Force PIE
 SET(CMAKE_POSITION_INDEPENDENT_CODE "True")
 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
index 663bb9d36958e52e603d91afe550c2434a4a5baa..7b010fee65fe653dc051baf544a9796601b8106e 100644 (file)
@@ -168,6 +168,9 @@ Base utils gcov objects
          -DMANIFESTDIR=%{MANIFESTDIR} \
          -DICONDIR=%{ICONDIR} \
          -DMANTESTBINDIR=%{MANTESTBINDIR} \
+%if "%_repository" == "emulator"
+         -DEMULATOR_BUILD=1 \
+%endif
 %if 0%{?no_feature_check:1} || "%_repository" == "emulator"
          -DNO_FEATURE_CHECK= \
 %endif
index 774aa63ebe59780bae431aa5d54dfb19760151ce..74b27e51b226014c51b74fa2f6ad6f8783bded8d 100644 (file)
@@ -130,6 +130,7 @@ TEST_F(WebAuthnAPITest, cancel_not_allowed_N)
     EXPECT_EQ(ret, WAUTHN_ERROR_NOT_ALLOWED);
 }
 
+#ifndef EMULATOR_BUILD
 TEST_F(WebAuthnAPITest, MC_valid_request_and_cancel_P)
 {
     sleep(3); // wait 3 secs for make interval
@@ -167,6 +168,6 @@ TEST_F(WebAuthnAPITest, GA_valid_request_and_cancel_P)
     EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
     sleep(3); // wait 3 secs for make interval
 }
-
+#endif
 
 } // namespace WA