From 0dbf1b9636a4ee52936e7779c2a06718892d2718 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Tue, 16 Jun 2015 17:32:03 +0800 Subject: [PATCH] suite: move fuzz_hardness.c to suite/fuzz/ --- .gitignore | 3 +++ suite/fuzz/Makefile | 10 ++++++++++ suite/fuzz/README | 2 ++ {tests => suite/fuzz}/fuzz_harness.c | 0 tests/Makefile | 2 +- 5 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 suite/fuzz/Makefile create mode 100644 suite/fuzz/README rename {tests => suite/fuzz}/fuzz_harness.c (100%) diff --git a/.gitignore b/.gitignore index 3482ee957..c38e5f84f 100644 --- a/.gitignore +++ b/.gitignore @@ -87,5 +87,8 @@ xcode/Capstone.xcodeproj/project.xcworkspace/xcuserdata # suite/ test_arm_regression test_arm_regression.o +fuzz_harness +fuzz_harness.o + *.s diff --git a/suite/fuzz/Makefile b/suite/fuzz/Makefile new file mode 100644 index 000000000..63a8731be --- /dev/null +++ b/suite/fuzz/Makefile @@ -0,0 +1,10 @@ +LIBNAME = capstone + +fuzz_harness: fuzz_harness.o + ${CC} $< -O3 -Wall -l$(LIBNAME) -o $@ + +%.o: %.c + ${CC} -c -I../../include $< -o $@ + +clean: + rm -rf *.o fuzz_harness diff --git a/suite/fuzz/README b/suite/fuzz/README new file mode 100644 index 000000000..0e637936d --- /dev/null +++ b/suite/fuzz/README @@ -0,0 +1,2 @@ +This directory contains a fuzz testing harness for Capstone. +Run "make" to compile this code. diff --git a/tests/fuzz_harness.c b/suite/fuzz/fuzz_harness.c similarity index 100% rename from tests/fuzz_harness.c rename to suite/fuzz/fuzz_harness.c diff --git a/tests/Makefile b/tests/Makefile index ae5f45ff9..8d0b94761 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -64,7 +64,7 @@ endif .PHONY: all clean -SOURCES = test.c test_detail.c test_skipdata.c test_iter.c fuzz_harness.c +SOURCES = test.c test_detail.c test_skipdata.c test_iter.c ifneq (,$(findstring arm,$(CAPSTONE_ARCHS))) SOURCES += test_arm.c endif