diff options
author | Cyril SIX <cyril.six@kalray.eu> | 2019-03-19 11:56:19 +0100 |
---|---|---|
committer | Cyril SIX <cyril.six@kalray.eu> | 2019-03-19 11:56:19 +0100 |
commit | 23fb9970915ab586a3c5c3a55c5d3ec372604f7b (patch) | |
tree | f319a6738f5561ea68f4e46fb245bcb399ff901f | |
parent | b74e3c48e601e46cb695caccc162cd03e781d739 (diff) | |
download | compcert-kvx-23fb9970915ab586a3c5c3a55c5d3ec372604f7b.tar.gz compcert-kvx-23fb9970915ab586a3c5c3a55c5d3ec372604f7b.zip |
Small improvements to interop test Makefile
-rw-r--r-- | test/mppa/interop/Makefile | 2 | ||||
-rw-r--r-- | test/mppa/interop/framework.h | 35 |
2 files changed, 33 insertions, 4 deletions
diff --git a/test/mppa/interop/Makefile b/test/mppa/interop/Makefile index 5818cbcb..a405ebd6 100644 --- a/test/mppa/interop/Makefile +++ b/test/mppa/interop/Makefile @@ -28,7 +28,7 @@ CCPATH=$(shell which $(CC)) CCOMPPATH=$(shell which $(CCOMP)) SIMUPATH=$(shell which $(SIMU)) -TESTNAMES=$(filter-out $(VAARG_COMMON),$(filter-out $(COMMON),$(notdir $(subst .c,,$(wildcard $(DIR)/*.c))))) +TESTNAMES ?= $(filter-out $(VAARG_COMMON),$(filter-out $(COMMON),$(notdir $(subst .c,,$(wildcard $(DIR)/*.c))))) X86_GCC_OUT=$(addprefix $(OUTDIR)/,$(addsuffix .x86-gcc.out,$(TESTNAMES))) GCC_OUT=$(addprefix $(OUTDIR)/,$(addsuffix .gcc.out,$(TESTNAMES))) diff --git a/test/mppa/interop/framework.h b/test/mppa/interop/framework.h index 52ba97bc..3bbfa271 100644 --- a/test/mppa/interop/framework.h +++ b/test/mppa/interop/framework.h @@ -1,6 +1,7 @@ #ifndef __FRAMEWORK_H__ #define __FRAMEWORK_H__ +#include <stdio.h> #include "../prng/prng.c" #define BEGIN_TEST_N(type, N)\ @@ -16,7 +17,8 @@ #define BEGIN_TEST(type)\ int main(void){\ - type a, b, c, i, S;\ + type a, b, c, S;\ + int i;\ srand(0);\ S = 0;\ for (i = 0 ; i < 100 ; i++){\ @@ -27,11 +29,38 @@ /* In between BEGIN_TEST and END_TEST : definition of c */ -#define END_TEST()\ +#define END_TEST64()\ + printf("%llu\t%llu\t%llu\n", a, b, c);\ S += c;\ }\ return S;\ } - /* END END_TEST */ + /* END END_TEST64 */ + +#define END_TEST32()\ + printf("%u\t%u\t%u\n", a, b, c);\ + S += c;\ + }\ + return S;\ + } + /* END END_TEST32 */ + +#define END_TESTF32()\ + printf("%e\t%e\t%e\n", a, b, c);\ + S += c;\ + }\ + return 0;\ + } + /* END END_TESTF32 */ + +#define END_TESTF64()\ + printf("%e\t%e\t%e\n", a, b, c);\ + S += c;\ + }\ + return 0;\ + } + /* END END_TESTF64 */ #endif + + |