Skip to content

Commit

Permalink
Merge pull request #2 from DanieleDeSensi/multi
Browse files Browse the repository at this point in the history
[ADD] Blackbox support
[ADD] C interface for instrumenter
[ADD] USLP Predictor
[MOD] Major refactoring
[ADD] Unit testing
[ADD] Cppcheck
  • Loading branch information
DanieleDeSensi authored Aug 28, 2017
2 parents fdc9bec + 50e1679 commit 4f4791e
Show file tree
Hide file tree
Showing 668 changed files with 96,264 additions and 3,161 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.o
*.a
*.gcov
*.gcda
*.gcno
proc.out
/src/external/mammut/*
/src/external/knarr/*
/test/googletest/*
microbench/check
microbench/ticksPerNs
microbench/voltageTable
microbench/voltageTable.cpp
12 changes: 6 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "src/external/Mammut"]
path = src/external/Mammut
url = https://github.com/DanieleDeSensi/Mammut.git
[submodule "src/external/orlog"]
path = src/external/orlog
url = https://github.com/DanieleDeSensi/orlog.git
[submodule "src/external/mammut"]
path = src/external/mammut
url = https://github.com/DanieleDeSensi/mammut.git
[submodule "src/external/knarr"]
path = src/external/knarr
url = https://github.com/DanieleDeSensi/knarr.git
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
language: cpp
compiler:
- gcc
# - clang
sudo: required
dist: trusty

install:
# CppCheck
- sudo apt-get install -qq cppcheck

script:
# Runs compilation, cppcheck, tests and coverage collection
- make develcheck

after_success:
# codecov.io
- bash <(curl -s https://codecov.io/bash) -X gcov -f 'test/gcov/*.gcov'

notifications:
email:
recipients:
- [email protected]
on_success: never # default: change
on_failure: always # default: always

34 changes: 28 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ export NORNIR_PATH_INCLUDE = $(NORNIR_PATH)/include/nornir

export CC = gcc
export CXX = g++
export OPTIMIZE_FLAGS = -finline-functions -O3 #-DPOOL
export OPTIMIZE_FLAGS = -finline-functions -O3 #-DPOOL
export DEBUG_FLAGS = #-DDEBUG_PREDICTORS -DDEBUG_SELECTORS #-DDEBUG_DF_STREAM -DDEBUG_NODE -DDEBUG_KNOB -DDEBUG_MANAGER
export CXXFLAGS = -Wall -pedantic --std=c++11 $(OPTIMIZE_FLAGS) $(DEBUG_FLAGS)
export LDLIBS = -lnornir -pthread -lrt -lm -lmlpack -llapack -lblas -lgsl -lgslcblas -larmadillo -lorlog -lanl
export INCS = -I$(realpath ./src/external/fastflow) -I/usr/include/libxml2
export LDFLAGS = -L$(realpath .)/src -L$(realpath .)/src/external/orlog/src
export CXXFLAGS = $(COVERAGE_FLAGS) -Wall -pedantic --std=c++11 $(OPTIMIZE_FLAGS) $(DEBUG_FLAGS)
export LDLIBS = $(COVERAGE_LIBS) -lnornir -pthread -lrt -lm -lmlpack -llapack -lblas -lgsl -lgslcblas -larmadillo -lknarr -lanl
export INCS = -I$(realpath ./src/external/fastflow) -I$(realpath ./src/external/tclap-1.2.1/include) -I/usr/include/libxml2
export LDFLAGS = -L$(realpath .)/src -L$(realpath .)/src/external/knarr/src

.PHONY: all demo clean cleanall install uninstall microbench bin
.PHONY: all demo clean cleanall install uninstall microbench bin test gcov develcheck

all:
python submodules_init.py
Expand All @@ -21,16 +21,38 @@ all:
$(MAKE) -C microbench checksupported
clean:
$(MAKE) -C src clean
$(MAKE) -C demo clean
$(MAKE) -C examples clean
$(MAKE) -C microbench clean
$(MAKE) -C bin clean
$(MAKE) -C test clean
demo:
$(MAKE) -C demo
$(MAKE) -C examples
bin:
$(MAKE) -C bin
cppcheck:
cppcheck --xml --xml-version=2 --enable=warning,performance,information,style --inline-suppr --error-exitcode=1 --force . --suppressions-list=./test/cppcheck/suppressions-list.txt -isrc/external -itest -iexamples 2> cppcheck-report.xml || (cat cppcheck-report.xml; exit 2)
# Compiles and runs all the tests.
test:
make cleanall
make "COVERAGE_FLAGS=-fprofile-arcs -ftest-coverage"
cd test && ./installdep.sh
cd ..
$(MAKE) "COVERAGE_LIBS=-lgcov" -C test && cd test && ./runtests.sh
cd ..
gcov:
./test/gcov/gcov.sh
# Performs all the checks
develcheck:
$(MAKE) cppcheck && $(MAKE) test && $(MAKE) gcov && $(MAKE) bin
cleanall:
$(MAKE) -C src cleanall
$(MAKE) -C demo cleanall
$(MAKE) -C examples cleanall
$(MAKE) -C microbench cleanall
$(MAKE) -C bin cleanall
$(MAKE) -C test cleanall
install:
$(MAKE) -C src install
uninstall:
Expand Down
2 changes: 1 addition & 1 deletion bin/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TARGET = manager-single manager-external
TARGET = manager-single manager-external manager-blackbox

.PHONY: all clean cleanall

Expand Down
Loading

0 comments on commit 4f4791e

Please sign in to comment.