diff options
author | Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> | 2018-02-15 03:04:03 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-02-20 22:19:54 +0300 |
commit | f4d395f2a80646c0609b62fbe37cd14465df74ac (patch) | |
tree | 5cee6850b3a91d9495911ae3006b6aecfe46cded /test/validation/api/hash | |
parent | dab09417bf432da56aeddb2feaef9e6a11b739d7 (diff) |
validation: hash: simplify test infrastructure
Merge separate file with just main() function into main test file.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test/validation/api/hash')
-rw-r--r-- | test/validation/api/hash/Makefile.am | 2 | ||||
-rw-r--r-- | test/validation/api/hash/hash.c | 5 | ||||
-rw-r--r-- | test/validation/api/hash/hash.h | 24 | ||||
-rw-r--r-- | test/validation/api/hash/hash_main.c | 14 |
4 files changed, 3 insertions, 42 deletions
diff --git a/test/validation/api/hash/Makefile.am b/test/validation/api/hash/Makefile.am index 8f0057782..0d843ea74 100644 --- a/test/validation/api/hash/Makefile.am +++ b/test/validation/api/hash/Makefile.am @@ -1,4 +1,4 @@ include ../Makefile.inc test_PROGRAMS = hash_main -hash_main_SOURCES = hash_main.c hash.c hash.h +hash_main_SOURCES = hash.c diff --git a/test/validation/api/hash/hash.c b/test/validation/api/hash/hash.c index 886df502e..2216dff89 100644 --- a/test/validation/api/hash/hash.c +++ b/test/validation/api/hash/hash.c @@ -8,9 +8,8 @@ #include <odp_api.h> #include <odp_cunit_common.h> -#include "hash.h" -void hash_test_crc32c(void) +static void hash_test_crc32c(void) { uint32_t test_value = 0x12345678; uint32_t ret = odp_hash_crc32c(&test_value, 4, 0); @@ -39,7 +38,7 @@ odp_suiteinfo_t hash_suites[] = { ODP_SUITE_INFO_NULL }; -int hash_main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int ret; diff --git a/test/validation/api/hash/hash.h b/test/validation/api/hash/hash.h deleted file mode 100644 index 936571e6a..000000000 --- a/test/validation/api/hash/hash.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _ODP_TEST_HASH_H_ -#define _ODP_TEST_HASH_H_ - -#include <odp_cunit_common.h> - -/* test functions: */ -void hash_test_crc32c(void); - -/* test arrays: */ -extern odp_testinfo_t hash_suite[]; - -/* test registry: */ -extern odp_suiteinfo_t hash_suites[]; - -/* main test program: */ -int hash_main(int argc, char *argv[]); - -#endif diff --git a/test/validation/api/hash/hash_main.c b/test/validation/api/hash/hash_main.c deleted file mode 100644 index 089b1f95a..000000000 --- a/test/validation/api/hash/hash_main.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include "config.h" - -#include "hash.h" - -int main(int argc, char *argv[]) -{ - return hash_main(argc, argv); -} |