mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 17:11:40 -05:00
-Updated Tup for test case coverage, changed Tupfiles, added test.sh.
This commit is contained in:
parent
fca1a06494
commit
eb792ae3a9
5 changed files with 53 additions and 14 deletions
3
Tupfile
3
Tupfile
|
@ -1,4 +1,5 @@
|
||||||
|
|
||||||
LDFLAGS += `pkg-config --libs jack sndfile cairomm-1.0 ntk ntk_images`
|
LDFLAGS +=`pkg-config --libs jack sndfile cairomm-1.0 ntk ntk_images`
|
||||||
|
LDFLAGS +=-lgcov
|
||||||
|
|
||||||
: src/*.o |> g++ %f $(LDFLAGS) -o %o |> luppp
|
: src/*.o |> g++ %f $(LDFLAGS) -o %o |> luppp
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
|
||||||
# Tup build file for Luppp
|
# Tup build file for Luppp
|
||||||
|
#
|
||||||
|
CFLAGS += -g -Wall -march=native -msse -mfpmath=sse -ffast-math -fprofile-arcs -ftest-coverage
|
||||||
|
|
||||||
CFLAGS += -g -Wall -march=native -msse -mfpmath=sse -ffast-math
|
INCLUDES += `pkg-config --cflags jack sndfile cairomm-1.0 ntk ntk_images`
|
||||||
|
|
||||||
INCLUDES += `pkg-config --cflags jack sndfile cairomm-1.0 ntk ntk_images`
|
|
||||||
|
|
||||||
: foreach *.cxx observer/*.cxx state/*.cxx cjson/*.c dsp/*.cxx controller/*.cxx \
|
: 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
|
||||||
|
|
||||||
|
|
|
@ -6,28 +6,30 @@
|
||||||
#define NAME "Luppp"
|
#define NAME "Luppp"
|
||||||
|
|
||||||
/// TEST OPTIONS
|
/// TEST OPTIONS
|
||||||
#define BUILD_TESTS 1
|
#define BUILD_TESTS 1
|
||||||
|
|
||||||
|
// only works with BUILD TESTS
|
||||||
|
#define BUILD_COVERAGE_TEST 1
|
||||||
|
|
||||||
/// DEBUG OPTIONS
|
/// DEBUG OPTIONS
|
||||||
// Track operations
|
// Track operations
|
||||||
#define DEBUG_TRACKS 1
|
#define DEBUG_TRACKS 1
|
||||||
|
|
||||||
// Clip selection / queueing
|
// Clip selection / queueing
|
||||||
#define DEBUG_CLIP 1
|
#define DEBUG_CLIP 1
|
||||||
|
|
||||||
// Buffer loading / resizing
|
// Buffer loading / resizing
|
||||||
#define DEBUG_BUFFER 1
|
#define DEBUG_BUFFER 1
|
||||||
|
|
||||||
// Logic : Warning NON RT!
|
// Logic : Warning NON RT!
|
||||||
#define DEBUG_LOGIC 1
|
#define DEBUG_LOGIC 1
|
||||||
|
|
||||||
// State save / load
|
// State save / load
|
||||||
#define DEBUG_STATE 1
|
#define DEBUG_STATE 1
|
||||||
|
|
||||||
|
|
||||||
/// COMPILE OPTIONS
|
/// COMPILE OPTIONS
|
||||||
#define DEBUG_KILL_ON_ERR 1
|
#define DEBUG_KILL_ON_ERR 1
|
||||||
|
|
||||||
|
|
||||||
/// General Options
|
/// General Options
|
||||||
|
|
11
src/main.cxx
11
src/main.cxx
|
@ -38,10 +38,17 @@ int main(int argc, char** argv)
|
||||||
jack = new Jack();
|
jack = new Jack();
|
||||||
|
|
||||||
#ifdef BUILD_TESTS
|
#ifdef BUILD_TESTS
|
||||||
cout << "New GUI, JACK() made" << endl;
|
|
||||||
jack->getGridLogic()->runTests();
|
jack->getGridLogic()->runTests();
|
||||||
cout << "Done testing." << endl;
|
|
||||||
|
#ifdef BUILD_COVERAGE_TEST
|
||||||
|
LUPPP_NOTE("%s","Done testing, quitting!");
|
||||||
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// FIXME: Reset the state of GUI / GridLogic here. Create a "new session"?
|
||||||
|
|
||||||
|
#endif
|
||||||
|
cout << "Done testing... launching Luppp." << endl;
|
||||||
jack->activate();
|
jack->activate();
|
||||||
gui->show();
|
gui->show();
|
||||||
}
|
}
|
||||||
|
|
29
test.sh
Normal file
29
test.sh
Normal file
|
@ -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…
Add table
Reference in a new issue