Skip to content
This repository has been archived by the owner on Dec 2, 2018. It is now read-only.

Commit

Permalink
initial commit; have tests for relay
Browse files Browse the repository at this point in the history
  • Loading branch information
blalor committed May 17, 2011
1 parent d006515 commit 7be4129
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
test/furnace_tests
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "test/support/CppUTest"]
path = test/support/CppUTest
url = git@github.com:blalor/CppUTest.git
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.PHONY: test
test:
make -C test

.PHONY: ci
ci:
$(HOME)/devel/git_repos/simple-ci/bin/simple_ci.py . ./ci_wrapper.sh

12 changes: 12 additions & 0 deletions ci_wrapper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

make -C test test
rc=$?

if [ $rc -ne 0 ]; then
growlnotify -a Xcode -n simple-ci -d bravo5.simpleci -t CI -m "BUILD FAILED"
# else
# growlnotify -a Xcode -n simple-ci -d bravo5.simpleci -m "Success"
fi

exit $rc
48 changes: 48 additions & 0 deletions test/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#Set this to @ to keep the makefile quiet
SILENCE = @
ARFLAGS += -c

#---- Outputs ----#
COMPONENT_NAME = furnace

#--- Inputs ----#
CPP_PLATFORM = Gcc
PROJECT_HOME_DIR = ..
CPPUTEST_HOME = $(PROJECT_HOME_DIR)/test/support/CppUTest

CPPUTEST_USE_MEM_LEAK_DETECTION = Y
CPPUTEST_USE_STD_CPP_LIB = N
CPPUTEST_USE_GCOV = Y

CPPUTEST_OBJS_DIR = $(PROJECT_HOME_DIR)/build/objs
CPPUTEST_LIB_DIR = $(PROJECT_HOME_DIR)/build/lib
CPPUTEST_GCOV_DIR = $(PROJECT_HOME_DIR)/build/gcov

CLOCK = 16000000
CPPUTEST_ADDITIONAL_CFLAGS = -DF_CPU=$(CLOCK)
CPPUTEST_ADDITIONAL_CXXFLAGS = -DF_CPU=$(CLOCK)

SRC_DIRS = \
$(PROJECT_HOME_DIR)/main/src

TEST_SRC_DIRS = \
src

INCLUDE_DIRS = \
$(CPPUTEST_HOME)/include \
$(PROJECT_HOME_DIR)/main/src \
$(PROJECT_HOME_DIR)/test/src

# MOCKS_SRC_DIRS = \
# mocks

CPPUTEST_WARNINGFLAGS = -Wall -Wswitch-default -Werror
CPPUTEST_CFLAGS = -std=c99
CPPUTEST_CFLAGS += -Wall -Wstrict-prototypes -pedantic
LD_LIBRARIES = -lpthread

include $(CPPUTEST_HOME)/build/MakefileWorker.mk

# bit of a hack; shouldn't really need to declare this dep here…
$(CPPUTEST_LIB):
make -C $(CPPUTEST_HOME) all extensions
5 changes: 5 additions & 0 deletions test/src/AllTests.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "CppUTest/CommandLineTestRunner.h"

int main(int argc, char** argv) {
return CommandLineTestRunner::RunAllTests(argc, argv);
}
1 change: 1 addition & 0 deletions test/support/CppUTest
Submodule CppUTest added at 7535a2

0 comments on commit 7be4129

Please sign in to comment.