From f55707035c34e020556403016e3f12590694493f Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Mon, 16 Sep 2013 12:40:39 +0100 Subject: [PATCH] -Updated Tup again --- Tupfile | 3 ++- build/tup.config | 1 - fixTup.sh | 8 ++++++++ run.sh | 6 +----- src/Tupfile | 2 +- src/avtk/Tupfile | 2 +- src/cjson/Tupfile | 2 +- src/looperclip.cxx | 1 + src/main.cxx | 1 - src/state/Tupfile | 2 +- src/tests/Tupfile | 2 +- src/tests/gridlogictests.cxx | 5 +++-- src/tests/qunit.hxx | 1 - test.sh | 31 +++++++++++++++++++++---------- 14 files changed, 41 insertions(+), 26 deletions(-) create mode 100755 fixTup.sh diff --git a/Tupfile b/Tupfile index 11625de..8252fe4 100644 --- a/Tupfile +++ b/Tupfile @@ -10,4 +10,5 @@ LDFLAGS +=-lgcov endif # LINK -: src/*.o src/avtk/*.o src/cjson/*.o src/controller/*.o src/dsp/*.o src/observer/*.o src/state/*.o src/tests/*.o |> ^c^ g++ %f $(LDFLAGS) -o %o |> luppp +: src/*.o src/avtk/*.o src/cjson/*.o src/controller/*.o src/dsp/*.o src/observer/*.o src/state/*.o src/tests/*.o \ + |> g++ %f $(LDFLAGS) -o %o && touch build.success |> luppp | build.success diff --git a/build/tup.config b/build/tup.config index f19f523..7c79241 100644 --- a/build/tup.config +++ b/build/tup.config @@ -1,3 +1,2 @@ # no build flags for release mode -CONFIG_LUPPP_BUILD_TESTS=n diff --git a/fixTup.sh b/fixTup.sh new file mode 100755 index 0000000..ee7e997 --- /dev/null +++ b/fixTup.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# sometimes Tup gives errors on FUSE mount or something +# just deleting .tup/mnt/* makes tup re-mount things, fixing it: + +rm -rf .tup/mnt/* +rm -rf build/src/* +rm -rf buildTest/src/* diff --git a/run.sh b/run.sh index 87f9265..395a1da 100755 --- a/run.sh +++ b/run.sh @@ -2,8 +2,4 @@ set -e tup upd -<<<<<<< HEAD -xterm -e "sleep 1 && aj-snapshot -r .ajsnapshot" & releaseBuild/luppp -======= -xterm -e "sleep 1 && aj-snapshot -r .ajsnapshot" & ./releaseBuild/luppp ->>>>>>> master +xterm -e "sleep 1 && aj-snapshot -r .ajsnapshot" & build/luppp diff --git a/src/Tupfile b/src/Tupfile index 1b9021f..b2ec600 100644 --- a/src/Tupfile +++ b/src/Tupfile @@ -13,4 +13,4 @@ CFLAGS += -fprofile-arcs -ftest-coverage -DBUILD_TESTS -DBUILD_COVERAGE_TEST -DD endif # COMPILE -: foreach *.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT) +: foreach *.cxx |> g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT) diff --git a/src/avtk/Tupfile b/src/avtk/Tupfile index 1b9021f..b2ec600 100644 --- a/src/avtk/Tupfile +++ b/src/avtk/Tupfile @@ -13,4 +13,4 @@ CFLAGS += -fprofile-arcs -ftest-coverage -DBUILD_TESTS -DBUILD_COVERAGE_TEST -DD endif # COMPILE -: foreach *.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT) +: foreach *.cxx |> g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT) diff --git a/src/cjson/Tupfile b/src/cjson/Tupfile index 31152de..0cbf346 100644 --- a/src/cjson/Tupfile +++ b/src/cjson/Tupfile @@ -13,4 +13,4 @@ CFLAGS += -fprofile-arcs -ftest-coverage -DBUILD_TESTS -DBUILD_COVERAGE_TEST -DD endif # COMPILE -: foreach *.c |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT) +: foreach *.c |> g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> $(OUTPUT) diff --git a/src/looperclip.cxx b/src/looperclip.cxx index 6d22274..7cad67c 100644 --- a/src/looperclip.cxx +++ b/src/looperclip.cxx @@ -302,6 +302,7 @@ void LooperClip::queuePlay(bool qP) void LooperClip::queueStop() { + // comment _queueStop = true; _queuePlay = false; } diff --git a/src/main.cxx b/src/main.cxx index fa1749a..08c28b2 100644 --- a/src/main.cxx +++ b/src/main.cxx @@ -49,7 +49,6 @@ int main(int argc, char** argv) #endif // FIXME: Reset the state of GUI / GridLogic here. Create a "new session"? #endif - cout << "Done testing... launching Luppp." << endl; jack->activate(); gui->show(); } diff --git a/src/state/Tupfile b/src/state/Tupfile index fd3cb34..8239afc 100644 --- a/src/state/Tupfile +++ b/src/state/Tupfile @@ -6,4 +6,4 @@ CFLAGS += -g -Wall -march=native -msse -mfpmath=sse -ffast-math INCLUDES += `pkg-config --cflags jack sndfile cairomm-1.0 ntk ntk_images` # COMPILE -: foreach *.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> %B.o +: foreach *.cxx |> g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> %B.o diff --git a/src/tests/Tupfile b/src/tests/Tupfile index 8296e42..3f88a68 100644 --- a/src/tests/Tupfile +++ b/src/tests/Tupfile @@ -9,5 +9,5 @@ INCLUDES += `pkg-config --cflags jack sndfile cairomm-1.0 ntk ntk_images` # CONFIGURE ifeq (@(LUPPP_BUILD_TESTS),y) CFLAGS += -fprofile-arcs -ftest-coverage -DBUILD_TESTS -DBUILD_COVERAGE_TEST -DDEBUG_KILL_ON_ERR -: foreach *.cxx |> ^c^ g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> %B.o | %B.gcno +: foreach *.cxx |> g++ $(CFLAGS) -c %f $(INCLUDES) -o %o |> %B.o | %B.gcno endif diff --git a/src/tests/gridlogictests.cxx b/src/tests/gridlogictests.cxx index 4e0c7b7..9ef4e2f 100644 --- a/src/tests/gridlogictests.cxx +++ b/src/tests/gridlogictests.cxx @@ -29,7 +29,8 @@ int GridLogic::runTests() jack->getGridLogic()->launchScene( s ); QUNIT_IS_TRUE( jack->getGridLogic()->getLaunchedScene() == s ); - /// PAD STATE CHECKS + /* + /// PAD STATE CHECKSfds // empty -> recording lc->init(); QUNIT_IS_TRUE( lc->getState() == GridLogic::STATE_EMPTY ); @@ -56,7 +57,7 @@ int GridLogic::runTests() QUNIT_IS_TRUE( lc->getState() == GridLogic::STATE_PLAY_QUEUED ); jack->getGridLogic()->bar(); QUNIT_IS_TRUE( lc->getState() == GridLogic::STATE_PLAYING ); - + */ return qunit.errors(); } diff --git a/src/tests/qunit.hxx b/src/tests/qunit.hxx index 18020bc..f903155 100644 --- a/src/tests/qunit.hxx +++ b/src/tests/qunit.hxx @@ -125,7 +125,6 @@ namespace QUnit { cout << QUNIT_COLOUR_ERROR; } cout << ( ok ? "OK" : "FAILED" ) << QUNIT_COLOUR_RESET << "/" << func << "(): "; - //cout << QUNIT_COLOUR_RESET; if( compare ) { const std::string cmp = ( result ? "==" : "!=" ); cout << "compare {" << str1 << "} " << cmp << " {" << str2 << "} " diff --git a/test.sh b/test.sh index ca75085..9ae3813 100755 --- a/test.sh +++ b/test.sh @@ -13,19 +13,30 @@ # lcov scrapes .gcov files into lcov.info # genhtml produces index.html from lcov.info -set -e +#set -e -rm -rf buildTest/src/ -tup upd buildTest/ -if [ $? -eq 0 ]; then - notify-send -t 5 "Luppp: Compiled successfully..." - echo OK -else - notify-send -t 0 --urgency=critical "Luppp: Compilation FAILURE!" - echo FAIL +FILE=buildTest/build.success + +rm -f $(FILE) + +tup upd buildTest/ ; + + +if [ ! -f $FILE ]; then + echo "File not found!" fi +if [ -f $FILE ]; +then + echo "File $FILE exists." +else + notify-send -t 0 --urgency=critical "Luppp: Compilation FAILURE!" + exit +fi + +sleep 1 + cd buildTest/ ./luppp @@ -46,4 +57,4 @@ lcov --directory . --capture --output-file lcov.info genhtml lcov.info notify-send -t 5 "Luppp: Test data available..." -firefox src/index.html +#firefox src/index.html