AM_SILENT_RULES([yes])
AC_PROG_CC
+AC_PROG_CXX
LT_PREREQ([2.2])
LT_INIT([disable-static])
wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
fi
+# pepper-tests
+PEPPER_TESTS_REQUIRES="gmock"
+PKG_CHECK_MODULES(PEPPER_TESTS, [$PEPPER_TESTS_REQUIRES])
+
+AC_SUBST(PEPPER_TESTS_CFLAGS)
+AC_SUBST(PEPPER_TESTS_LIBS)
+
# document
AC_ARG_ENABLE([document],
[AC_HELP_STRING([--disable-document],
src/lib/wayland/Makefile
src/bin/doctor/Makefile
src/samples/Makefile
+tests/Makefile
pkgconfig/pepper.pc
pkgconfig/pepper-render.pc
pkgconfig/pepper-fbdev.pc
--- /dev/null
+/**************************************************************************
+ *
+ * Copyright 2021 Samsung Electronics co., Ltd. All Rights Reserved.
+ *
+ * Contact: SooChan Lim <sc1.lim@samsung.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+**************************************************************************/
+
+#include "gmock/gmock.h"
+
+#ifdef TIZEN_TEST_GCOV
+extern "C" void __gcov_flush(void);
+#endif
+
+int main(int argc, char **argv)
+{
+ auto AllTestSuccess = false;
+
+#ifdef TIZEN_TEST_GCOV
+ setenv("GCOV_PREFIX", "/tmp", 1);
+#endif
+
+ try {
+ ::testing::InitGoogleMock(&argc, argv);
+ ::testing::FLAGS_gtest_death_test_style = "fast";
+ } catch ( ... ) {
+ std::cout << "error while trying to init google tests.\n";
+ exit(EXIT_FAILURE);
+ }
+
+ try {
+ AllTestSuccess = RUN_ALL_TESTS() == 0 ? true : false;
+ } catch (const ::testing::internal::GoogleTestFailureException & e) {
+ AllTestSuccess = false;
+ std::cout << "GoogleTestFailureException was thrown:" << e.what() << std::endl;
+ std::cout << "\n";
+ }
+
+#ifdef TIZEN_TEST_GCOV
+ __gcov_flush();
+#endif
+
+ return AllTestSuccess;
+}