-Updated Tup for test case coverage, changed Tupfiles, added test.sh.
parent
fca1a06494
commit
eb792ae3a9
1
Tupfile
1
Tupfile
|
@ -1,4 +1,5 @@
|
|||
|
||||
LDFLAGS +=`pkg-config --libs jack sndfile cairomm-1.0 ntk ntk_images`
|
||||
LDFLAGS +=-lgcov
|
||||
|
||||
: src/*.o |> g++ %f $(LDFLAGS) -o %o |> luppp
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
|
||||
# Tup build file for Luppp
|
||||
|
||||
CFLAGS += -g -Wall -march=native -msse -mfpmath=sse -ffast-math
|
||||
#
|
||||
CFLAGS += -g -Wall -march=native -msse -mfpmath=sse -ffast-math -fprofile-arcs -ftest-coverage
|
||||
|
||||
INCLUDES += `pkg-config --cflags jack sndfile cairomm-1.0 ntk ntk_images`
|
||||
|
||||
: foreach *.cxx observer/*.cxx state/*.cxx cjson/*.c dsp/*.cxx controller/*.cxx \
|
||||
avtk/*.cxx |> g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> %B.o
|
||||
avtk/*.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> %B.o | %B.gcno
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
/// TEST OPTIONS
|
||||
#define BUILD_TESTS 1
|
||||
|
||||
// only works with BUILD TESTS
|
||||
#define BUILD_COVERAGE_TEST 1
|
||||
|
||||
/// DEBUG OPTIONS
|
||||
// Track operations
|
||||
|
|
11
src/main.cxx
11
src/main.cxx
|
@ -38,10 +38,17 @@ int main(int argc, char** argv)
|
|||
jack = new Jack();
|
||||
|
||||
#ifdef BUILD_TESTS
|
||||
cout << "New GUI, JACK() made" << endl;
|
||||
jack->getGridLogic()->runTests();
|
||||
cout << "Done testing." << endl;
|
||||
|
||||
#ifdef BUILD_COVERAGE_TEST
|
||||
LUPPP_NOTE("%s","Done testing, quitting!");
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
// FIXME: Reset the state of GUI / GridLogic here. Create a "new session"?
|
||||
|
||||
#endif
|
||||
cout << "Done testing... launching Luppp." << endl;
|
||||
jack->activate();
|
||||
gui->show();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
# Compile with:
|
||||
#define BUILD_TESTS
|
||||
#define BUILD_COVERAGE_TEST
|
||||
-lgcov
|
||||
|
||||
# Run program, the runtime determines the output!
|
||||
|
||||
# Run gcov on each file, it shows output data:
|
||||
gcov -r -b *.gcda
|
||||
|
||||
# Make lcov update the stats in its info file
|
||||
lcov --directory . -zerocounters
|
||||
lcov --directory . --capture --output-file lcov.info
|
||||
|
||||
# Generate HTML output
|
||||
genhtml lcov.info
|
||||
|
||||
rm src/*.gcda
|
||||
rm src/*.gcno
|
||||
|
||||
rm src/lcov.info
|
||||
rm src/gcov.css
|
||||
rm src/*.html
|
||||
rm src/*.png
|
||||
|
||||
rm gcov.data
|
||||
|
||||
|
Loading…
Reference in New Issue