Implement a "make check" target that will run the unit tests
parent
b744710ee3
commit
a632c82b59
|
@ -10,6 +10,8 @@ SUBPROJECTS = \
|
||||||
SoObjects \
|
SoObjects \
|
||||||
Main \
|
Main \
|
||||||
UI \
|
UI \
|
||||||
Tools
|
Tools \
|
||||||
|
Tests/Unit \
|
||||||
|
|
||||||
|
|
||||||
include $(GNUSTEP_MAKEFILES)/aggregate.make
|
include $(GNUSTEP_MAKEFILES)/aggregate.make
|
||||||
|
|
|
@ -27,11 +27,17 @@ $(TEST_TOOL)_OBJC_FILES += \
|
||||||
|
|
||||||
TEST_TOOL_NAME = $(TEST_TOOL)
|
TEST_TOOL_NAME = $(TEST_TOOL)
|
||||||
|
|
||||||
TEST_TOOL_CPPFLAGS += \
|
$(TEST_TOOL)_CPPFLAGS += \
|
||||||
-Wall -D_GNU_SOURCE -I../SOPE/ -I../SoObjects/ -I../UI/
|
-Wall -D_GNU_SOURCE -I../../SOPE/ -I../../SoObjects/ -I../../UI/
|
||||||
|
|
||||||
ADDITIONAL_LIB_DIRS += \
|
ADDITIONAL_LIB_DIRS += \
|
||||||
-L../SoObjects/SOGo -lSOGo -lNGMime -lNGCards -lGDLContentStore -lNGExtensions -lSBJson -lobjc -L/usr/local/lib -lSaxObjC
|
-L../../SoObjects/SOGo/SOGo.framework/Versions/Current -L../../SOPE/NGCards/obj -L../../SOPE/GDLContentStore/obj -lSOGo -lNGMime -lNGCards -lGDLContentStore -lNGExtensions -lSBJson -lobjc \
|
||||||
|
-L/usr/local/lib -lSaxObjC \
|
||||||
|
-Wl,-rpath,../../SoObjects/SOGo/SOGo.framework/Versions/Current -Wl,-rpath,../../SOPE/NGCards/obj -Wl,-rpath,../../SOPE/GDLContentStore/obj -Wl,-rpath,../../OGoContentStore/obj
|
||||||
|
ADDITIONAL_LDFLAGS += -Wl,--no-as-needed
|
||||||
|
|
||||||
|
check ::
|
||||||
|
./obj/sogo-tests
|
||||||
|
|
||||||
-include GNUmakefile.preamble
|
-include GNUmakefile.preamble
|
||||||
include $(GNUSTEP_MAKEFILES)/test-tool.make
|
include $(GNUSTEP_MAKEFILES)/test-tool.make
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
|
|
||||||
#import "SOGoTestRunner.h"
|
#import "SOGoTestRunner.h"
|
||||||
|
|
||||||
|
#define EXPECTED_FAILURES 3
|
||||||
|
|
||||||
@implementation SOGoTestRunner
|
@implementation SOGoTestRunner
|
||||||
|
|
||||||
+ (SOGoTestRunner *) testRunner
|
+ (SOGoTestRunner *) testRunner
|
||||||
|
@ -89,7 +91,7 @@
|
||||||
[allTestClasses autorelease];
|
[allTestClasses autorelease];
|
||||||
[self autorelease];
|
[self autorelease];
|
||||||
|
|
||||||
return rc;
|
return (failuresCount + errorsCount != EXPECTED_FAILURES);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) incrementTestCounter: (SOGoTestFailureCode) failureCode
|
- (void) incrementTestCounter: (SOGoTestFailureCode) failureCode
|
||||||
|
|
|
@ -35,6 +35,8 @@ install ::
|
||||||
tar cf - $(WOXS) | ( cd $(SOGO_TEMPLATESDIR); tar xf -) ;\
|
tar cf - $(WOXS) | ( cd $(SOGO_TEMPLATESDIR); tar xf -) ;\
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
check ::
|
||||||
|
|
||||||
clean ::
|
clean ::
|
||||||
|
|
||||||
distclean :: clean
|
distclean :: clean
|
||||||
|
|
|
@ -16,6 +16,8 @@ install ::
|
||||||
rm -rf $(SOGO_WEBSERVERRESOURCESDIR)/ckeditor/_source; \
|
rm -rf $(SOGO_WEBSERVERRESOURCESDIR)/ckeditor/_source; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
check ::
|
||||||
|
|
||||||
clean ::
|
clean ::
|
||||||
|
|
||||||
distclean :: clean
|
distclean :: clean
|
||||||
|
|
Loading…
Reference in New Issue