unittests(xlat): add unittests for stage1 translation library

This patch introduces the first part of the unittests for the
RMM xlat library.

The patch also moves the rand() initialization from individual
tests to the platform test helpers.

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: Id308c8f3590caf53e5552e7d8fc55667c66f7fbd
diff --git a/lib/realm/tests/buffer.cpp b/lib/realm/tests/buffer.cpp
index 77050df..f309028 100644
--- a/lib/realm/tests/buffer.cpp
+++ b/lib/realm/tests/buffer.cpp
@@ -19,7 +19,6 @@
 #include <string.h>
 #include <test_harness.h>
 #include <test_helpers.h>
-#include <time.h>
 #include <xlat_tables.h>
 }
 
@@ -80,7 +79,7 @@
 	 */
 	TEST_SETUP()
 	{
-		static int random_seed = 0;
+		test_helpers_init();
 
 		/* Enable the platform with support for multiple PEs */
 		test_helpers_rmm_start(true);
@@ -88,12 +87,6 @@
 		/* Make sure current cpu id is 0 (primary processor) */
 		host_util_set_cpuid(0U);
 
-		/* Initialize the random seed */
-		while (random_seed == 0) {
-			random_seed = (int)time(NULL);
-			srand(random_seed);
-		}
-
 		test_helpers_expect_assert_fail(false);
 	}