From df42a8f08e2c496b1359a0e13cb2ba892a4f6d2d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Jun 2015 16:12:18 +0300 Subject: Move tests invoke into separate make file. --- .gitignore | 4 +++- Makefile.am | 3 ++- test/Makefile | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 test/Makefile diff --git a/.gitignore b/.gitignore index ef1b9db..62ece06 100644 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,8 @@ po/remove-potcdate.* po/*.po~ # files created by configure -Makefile +/Makefile +/src/Makefile config.h config.log config.status @@ -81,6 +82,7 @@ my/* win/* test/*.out test.txt +test/astdumper.so # debian debian/* diff --git a/Makefile.am b/Makefile.am index 0f18d4d..7b61ae6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,6 +6,7 @@ SUBDIRS = src #EXTRA_DIST = test: - ${CXX} -fplugin=src/.libs/libastdumper.so ../test/test1.c 2>../test.txt + cp src/.libs/libastdumper.so src/.libs/astdumper.so + cd ../test && make .PHONY: test diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 0000000..87da8a7 --- /dev/null +++ b/test/Makefile @@ -0,0 +1,16 @@ +.PHONY: test1 all clean +.NOTPARALLEL: all + +CC := gcc-5 +CXX := g++-5 + +PLUGIN = ../build/src/.libs/astdumper.so +CMD = ${CXX} -fplugin=${PLUGIN} -fplugin-arg-astdumper-command=${1} ${2} 2>../${3} + +all: test1 clean + +clean: + @rm a.out 2>/dev/null || true + +test1: + $(call CMD,dump,test1.c,test.txt) -- cgit v1.2.3-70-g09d2