citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit d5d54f3475202b781199a9e80d7d89d72bec4f5b
parent 500c4108afff5a39294e199f5c029c9c3b29a18e
Author: kyle <kyle@getaddrinfo.net>
Date:   Sun,  1 Nov 2015 15:59:04 -0700

tests: get hello_world in order

Diffstat:
Mtests/hello_world/Makefile | 14++++++++++----
Rtests/hello_world/prog.c -> tests/hello_world/hello.c | 0
Atests/hello_world/hello.c.inst_good | 11+++++++++++
Dtests/hello_world/instrumented.c | 10----------
4 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/tests/hello_world/Makefile b/tests/hello_world/Makefile @@ -1,5 +1,11 @@ -test: - @sh test.sh +BIN = prog +SRCS = hello.c +OBJS = $(SRCS:c=o) -clean: - @rm -f prog prog_inst.c +$(BIN): $(OBJS) + $(CC) -o $(BIN) $(OBJS) $(LDLIBS) + +diff: + diff -u hello.c.inst hello.c.inst_good + +.include "../Makefile.test" diff --git a/tests/hello_world/prog.c b/tests/hello_world/hello.c diff --git a/tests/hello_world/hello.c.inst_good b/tests/hello_world/hello.c.inst_good @@ -0,0 +1,11 @@ +unsigned int lines[77]; +int size = 77; +char file_name[] = "/home/kyle/src/scv/tests/hello_world/hello.c"; +#include <stdio.h> + +int +main(void) +{ + (lines[6] = 1, printf("hello, world\n")); + return (lines[7] = 1, 0); +} diff --git a/tests/hello_world/instrumented.c b/tests/hello_world/instrumented.c @@ -1,10 +0,0 @@ -unsigned int lines[77]; -int size = 77; -#include <stdio.h> - -int -main(void) -{ - (lines[6] = 1, printf("hello, world\n")); - return (lines[7] = 1, 0); -}