diff options
author | Ingo Huerner <ingo_huerner@mentor.com> | 2017-04-19 08:15:05 +0200 |
---|---|---|
committer | Ingo Huerner <ingo_huerner@mentor.com> | 2017-04-19 08:15:05 +0200 |
commit | b7ec5f42ff77e2bcdbdaf41d4d0e380b4e2d6975 (patch) | |
tree | 7d1df269047d56c19d1a14c635f64de274e65ac4 /test/persistence_client_library_test_file.c | |
parent | 87281e7cb8e47cace208a1b0cf3109b37156418a (diff) | |
download | persistence-client-library-b7ec5f42ff77e2bcdbdaf41d4d0e380b4e2d6975.tar.gz |
Added environment checker to tests in order to detect insufficient persistence setup
Diffstat (limited to 'test/persistence_client_library_test_file.c')
-rw-r--r-- | test/persistence_client_library_test_file.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/test/persistence_client_library_test_file.c b/test/persistence_client_library_test_file.c index 51ebbfc..1f841a8 100644 --- a/test/persistence_client_library_test_file.c +++ b/test/persistence_client_library_test_file.c @@ -22,13 +22,14 @@ #include <unistd.h> /* exit */ #include <time.h> #include <fcntl.h> -#include <sys/mman.h> -#include <sys/stat.h> -#include <dbus/dbus.h> #include <dlt.h> #include <dlt_common.h> #include <pthread.h> -#include <string.h> + +#include <sys/mman.h> +#include <sys/stat.h> + +#include <dbus/dbus.h> #include <check.h> @@ -111,6 +112,7 @@ DLT_DECLARE_CONTEXT(gPcltDLTContext); // function prototype void run_concurrency_test(); +int check_environment(); void data_setup(void) { @@ -2223,6 +2225,13 @@ int main(int argc, char *argv[]) DLT_LOG(gPcltDLTContext, DLT_LOG_INFO, DLT_STRING("Starting PCL test")); + if(check_environment() != 1) + { + printf("\nERROR: Environemnt not setup correclty, won't run tests!\n"); + printf(" Please fix issues reported above.\n\n"); + return EXIT_FAILURE; + } + data_setupBlacklist(); if(argc == 1) |