Permalink
Browse files

Tests moved to testsuites/ directory.

  • Loading branch information...
danfis committed Aug 18, 2015
1 parent 000ddfb commit 99a91dfe5b37954ae18663eca7570d616b719061
View
@@ -17,8 +17,6 @@ endif
TARGETS = libcu.a
-TEST_OBJS = test.o test2.o
-
all: $(TARGETS)
libcu.a: cu.o
@@ -28,28 +26,6 @@ libcu.a: cu.o
cu.o: cu.c cu.h
$(CC) $(CFLAGS) -c -o $@ $<
-test: $(TEST_OBJS) libcu.a
- $(CC) $(CFLAGS) -o $@ $(TEST_OBJS) -L./ -lcu
-test-segfault: test-segfault.c libcu.a
- $(CC) $(CFLAGS) -o $@ $^ -L./ -lcu
-
-check: test test-segfault
- mkdir -p regressions
- touch regressions/testSuiteName.out
- touch regressions/testSuiteName.err
- touch regressions/testSuiteName2.out
- touch regressions/testSuiteName2.err
- touch regressions/testSuiteSegfault.out
- touch regressions/testSuiteSegfault.err
- touch regressions/testSuiteTest2.out
- touch regressions/testSuiteTest2.err
- -./test
- -cd regressions && $(PYTHON) ../cu-check-regressions
- @echo ""
- @echo "======= SEGFAULT: ========="
- @echo ""
- -./test-segfault
-
install: libcu.a
mkdir -p $(PREFIX)/$(INCLUDEDIR)
mkdir -p $(PREFIX)/$(LIBDIR)
@@ -65,10 +41,10 @@ deb:
clean:
rm -f *.o
- rm -f test
- rm -f test-segfault
rm -f $(TARGETS)
- rm -f tmp.*
- rm -rf regressions
+ $(MAKE) -C testsuites clean
+
+check:
+ $(MAKE) -C testsuites
.PHONY: all clean check
View
@@ -0,0 +1,3 @@
+test
+test-segfault
+regressions/
View
@@ -0,0 +1,37 @@
+CC ?= gcc
+PYTHON ?= python
+
+TEST_OBJS = test.o test2.o
+
+all: test test-segfault
+ mkdir -p regressions
+ touch regressions/testSuiteName.out
+ touch regressions/testSuiteName.err
+ touch regressions/testSuiteName2.out
+ touch regressions/testSuiteName2.err
+ touch regressions/testSuiteSegfault.out
+ touch regressions/testSuiteSegfault.err
+ touch regressions/testSuiteTest2.out
+ touch regressions/testSuiteTest2.err
+ -./test
+ -cd regressions && $(PYTHON) ../../cu-check-regressions
+ @echo ""
+ @echo "======= SEGFAULT: ========="
+ @echo ""
+ -./test-segfault
+
+test: $(TEST_OBJS)
+ $(CC) $(CFLAGS) -o $@ $(TEST_OBJS) -L../ -lcu
+
+test-segfault: test-segfault.c
+ $(CC) $(CFLAGS) -o $@ $^ -L../ -lcu
+
+clean:
+ rm -f *.o
+ rm -f test
+ rm -f test-segfault
+ rm -f tmp.*
+ rm -rf regressions
+
+
+.PHONY: all clean
@@ -1,5 +1,5 @@
#include <stdio.h>
-#include "cu.h"
+#include "../cu.h"
/**
* Definition of test function
@@ -1,5 +1,5 @@
#include <stdio.h>
-#include "cu.h"
+#include "../cu.h"
/**
* Test suite from imported from other file.
@@ -1,5 +1,5 @@
#include <stdio.h>
-#include "cu.h"
+#include "../cu.h"
TEST(testTest2Function)
{
File renamed without changes.

0 comments on commit 99a91df

Please sign in to comment.