Commit 99a91df 1 parent 000ddfb commit 99a91df Copy full SHA for 99a91df
File tree 7 files changed +47
-31
lines changed
7 files changed +47
-31
lines changed Original file line number Diff line number Diff line change 17
17
18
18
TARGETS = libcu.a
19
19
20
- TEST_OBJS = test.o test2.o
21
-
22
20
all : $(TARGETS )
23
21
24
22
libcu.a : cu.o
@@ -28,28 +26,6 @@ libcu.a: cu.o
28
26
cu.o : cu.c cu.h
29
27
$(CC ) $(CFLAGS ) -c -o $@ $<
30
28
31
- test : $(TEST_OBJS ) libcu.a
32
- $(CC ) $(CFLAGS ) -o $@ $(TEST_OBJS ) -L./ -lcu
33
- test-segfault : test-segfault.c libcu.a
34
- $(CC ) $(CFLAGS ) -o $@ $^ -L./ -lcu
35
-
36
- check : test test-segfault
37
- mkdir -p regressions
38
- touch regressions/testSuiteName.out
39
- touch regressions/testSuiteName.err
40
- touch regressions/testSuiteName2.out
41
- touch regressions/testSuiteName2.err
42
- touch regressions/testSuiteSegfault.out
43
- touch regressions/testSuiteSegfault.err
44
- touch regressions/testSuiteTest2.out
45
- touch regressions/testSuiteTest2.err
46
- -./test
47
- -cd regressions && $(PYTHON ) ../cu-check-regressions
48
- @echo " "
49
- @echo " ======= SEGFAULT: ========="
50
- @echo " "
51
- -./test-segfault
52
-
53
29
install : libcu.a
54
30
mkdir -p $(PREFIX ) /$(INCLUDEDIR )
55
31
mkdir -p $(PREFIX ) /$(LIBDIR )
65
41
66
42
clean :
67
43
rm -f * .o
68
- rm -f test
69
- rm -f test-segfault
70
44
rm -f $(TARGETS )
71
- rm -f tmp.*
72
- rm -rf regressions
45
+ $(MAKE ) -C testsuites clean
46
+
47
+ check :
48
+ $(MAKE ) -C testsuites
73
49
74
50
.PHONY : all clean check
Original file line number Diff line number Diff line change
1
+ test
2
+ test-segfault
3
+ regressions /
Original file line number Diff line number Diff line change
1
+ CC ?= gcc
2
+ PYTHON ?= python
3
+
4
+ TEST_OBJS = test.o test2.o
5
+
6
+ all : test test-segfault
7
+ mkdir -p regressions
8
+ touch regressions/testSuiteName.out
9
+ touch regressions/testSuiteName.err
10
+ touch regressions/testSuiteName2.out
11
+ touch regressions/testSuiteName2.err
12
+ touch regressions/testSuiteSegfault.out
13
+ touch regressions/testSuiteSegfault.err
14
+ touch regressions/testSuiteTest2.out
15
+ touch regressions/testSuiteTest2.err
16
+ -./test
17
+ -cd regressions && $(PYTHON ) ../../cu-check-regressions
18
+ @echo " "
19
+ @echo " ======= SEGFAULT: ========="
20
+ @echo " "
21
+ -./test-segfault
22
+
23
+ test : $(TEST_OBJS )
24
+ $(CC ) $(CFLAGS ) -o $@ $(TEST_OBJS ) -L../ -lcu
25
+
26
+ test-segfault : test-segfault.c
27
+ $(CC ) $(CFLAGS ) -o $@ $^ -L../ -lcu
28
+
29
+ clean :
30
+ rm -f * .o
31
+ rm -f test
32
+ rm -f test-segfault
33
+ rm -f tmp.*
34
+ rm -rf regressions
35
+
36
+
37
+ .PHONY : all clean
Original file line number Diff line number Diff line change 1
1
#include <stdio.h>
2
- #include "cu.h"
2
+ #include "../ cu.h"
3
3
4
4
/**
5
5
* Definition of test function
Original file line number Diff line number Diff line change 1
1
#include <stdio.h>
2
- #include "cu.h"
2
+ #include "../ cu.h"
3
3
4
4
/**
5
5
* Test suite from imported from other file.
Original file line number Diff line number Diff line change 1
1
#include <stdio.h>
2
- #include "cu.h"
2
+ #include "../ cu.h"
3
3
4
4
TEST (testTest2Function )
5
5
{
File renamed without changes.
You can’t perform that action at this time.
0 commit comments