##Testing
There is currently one general testing application and one KONAI SE specific tool:
-- *dcm_api_test*
+- *device-certificate-manager-tests*
Testing application should be executed after implementing changes to the DCM or to the DCM backend repository.
There is also one KONAI SE specific tool: *dcm_konaise_tool* used to test the KONAI SE backend implementation.
%files tests
%manifest %{name}.manifest
%license LICENSE
-%{_bindir}/dcm_api_test
+%{_bindir}/device-certificate-manager-tests
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK)
-ADD_EXECUTABLE(dcm_api_test api_test.cpp)
-TARGET_LINK_LIBRARIES(dcm_api_test
- device-certificate-manager
- ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
+SET(TARGET_TESTS "device-certificate-manager-tests")
+ADD_EXECUTABLE(${TARGET_TESTS}
+ device_certificate_manager_tests.cpp
+ api_test.cpp)
+
+TARGET_LINK_LIBRARIES(${TARGET_TESTS}
+ ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES}
+ device-certificate-manager)
INSTALL(TARGETS
- dcm_api_test
+ ${TARGET_TESTS}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
/******************************************************************
*
- * Copyright 2017 - 2018 Samsung Electronics All Rights Reserved.
+ * Copyright 2017 - 2020 Samsung Electronics All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
******************************************************************/
-#define BOOST_TEST_MODULE HW API test
-
-#include "device_certificate_manager.h"
#include <iostream>
#include <iomanip>
#include <cstring>
#include <boost/algorithm/hex.hpp>
#include <boost/test/unit_test.hpp>
+#include "device_certificate_manager.h"
+
+BOOST_AUTO_TEST_SUITE(API_TEST)
+
BOOST_AUTO_TEST_CASE(test01_dcm_create_key_context)
{
void *ctx;
free(signature);
}
+
+BOOST_AUTO_TEST_SUITE_END()
--- /dev/null
+/******************************************************************
+ *
+ * Copyright 2020 Samsung Electronics All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************/
+
+#define BOOST_TEST_MODULE DeviceCertificateManagerTests
+
+#include <boost/test/unit_test.hpp>
+#include <boost/test/unit_test_log.hpp>
+#include <boost/test/results_reporter.hpp>
+
+struct TestConfig {
+ TestConfig()
+ {
+ boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_test_units);
+ boost::unit_test::results_reporter::set_level(boost::unit_test::SHORT_REPORT);
+ }
+ ~TestConfig()
+ {
+ }
+};
+
+BOOST_GLOBAL_FIXTURE(TestConfig);