Initial draft of the build system

CMake function added for defining unit test suites. Using c-picker for
generating sources files.

Change-Id: I591c80d97bb141f4dd3848b1e289bc82844a508f
Signed-off-by: Imre Kis <imre.kis@arm.com>
diff --git a/tests/lib/libc/memcmp.yml b/tests/lib/libc/memcmp.yml
new file mode 100644
index 0000000..ce76156
--- /dev/null
+++ b/tests/lib/libc/memcmp.yml
@@ -0,0 +1,12 @@
+#
+# Copyright (c) 2019, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+elements:
+- file: lib/libc/memcmp.c
+  type: include
+- file: lib/libc/memcmp.c
+  type: function
+  name: memcmp
diff --git a/tests/lib/libc/memcpy.yml b/tests/lib/libc/memcpy.yml
new file mode 100644
index 0000000..f03c736
--- /dev/null
+++ b/tests/lib/libc/memcpy.yml
@@ -0,0 +1,12 @@
+#
+# Copyright (c) 2019, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+elements:
+- file: lib/libc/memcpy.c
+  type: include
+- file: lib/libc/memcpy.c
+  type: function
+  name: memcpy
diff --git a/tests/lib/libc/test_libc.cmake b/tests/lib/libc/test_libc.cmake
new file mode 100644
index 0000000..2dbf66f
--- /dev/null
+++ b/tests/lib/libc/test_libc.cmake
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2019, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+include(UnitTest)
+
+add_unit_test_suite(
+	TEST_NAME memcmp
+	TEST_SOURCES
+		${CMAKE_CURRENT_LIST_DIR}/test_memcmp.cpp
+		${CMAKE_CURRENT_LIST_DIR}/memcmp.yml
+	TEST_INCLUDES
+		${TF_A_PATH}/include
+		${TF_A_PATH}/include/lib/libc/aarch64/
+)
+
+add_unit_test_suite(
+	TEST_NAME memcpy
+	TEST_SOURCES
+		${CMAKE_CURRENT_LIST_DIR}/test_memcpy.cpp
+		${CMAKE_CURRENT_LIST_DIR}/memcpy.yml
+	TEST_INCLUDES
+		${TF_A_PATH}/include
+		${TF_A_PATH}/include/lib/libc/aarch64/
+)
diff --git a/tests/lib/libc/test_memcmp.cpp b/tests/lib/libc/test_memcmp.cpp
new file mode 100644
index 0000000..b4eb293
--- /dev/null
+++ b/tests/lib/libc/test_memcmp.cpp
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2019, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "CppUTest/TestHarness.h"
+extern "C" {
+#include "lib/libc/string.h"
+}
+
+TEST_GROUP(memcmp) {
+
+};
+
+TEST(memcmp, empty) {
+	LONGS_EQUAL(0, memcmp(NULL, NULL, 0))
+}
diff --git a/tests/lib/libc/test_memcpy.cpp b/tests/lib/libc/test_memcpy.cpp
new file mode 100644
index 0000000..64f02c2
--- /dev/null
+++ b/tests/lib/libc/test_memcpy.cpp
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2019, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "CppUTest/TestHarness.h"
+extern "C" {
+#include "lib/libc/string.h"
+}
+
+TEST_GROUP(memcpy) {
+
+};
+
+TEST(memcpy, empty) {
+	LONGS_EQUAL(0, memcpy(NULL, NULL, 0))
+}