jamoma / JamomaCore

Jamoma Frameworks for Audio and Control Structure
Other
36 stars 14 forks source link

EffectLib:test.cpp causes build to fail #172

Closed nwolek closed 10 years ago

nwolek commented 11 years ago

The transition to Xcode unit testing in the EffectsLib is not working. The build failure seems to be unrelated to a test failing, based on the console output below. I have isolated the problem to two lines of code and commented them out here: https://github.com/jamoma/JamomaCore/blob/feature/dictionary-rewrite/DSP/extensions/EffectsLib/test.cpp#L28

Here is what the console says when I comment out these lines:

Hi, World!
JamomaFoundation -- Version 0.6
Loaded from path = /Volumes/Storage/xcode_projects/Jamoma/Core/DSP/extensions/EffectsLib/build/test32
EXTENSION: /Volumes/Storage/xcode_projects/Jamoma/Core/DSP/extensions/EffectsLib/build/.
EXTENSION: /Volumes/Storage/xcode_projects/Jamoma/Core/DSP/extensions/EffectsLib/build/..
EXTENSION: /Volumes/Storage/xcode_projects/Jamoma/Core/DSP/extensions/EffectsLib/build/EffectsLib-i386.ttdylib
HANDLE: 0x0
EXTENSION: /Volumes/Storage/xcode_projects/Jamoma/Core/DSP/extensions/EffectsLib/build/EffectsLib-x86_64.ttdylib
HANDLE: 0x0
EXTENSION: /Volumes/Storage/xcode_projects/Jamoma/Core/DSP/extensions/EffectsLib/build/EffectsLib.ttdylib
HANDLE: 0x0
EXTENSION: /Volumes/Storage/xcode_projects/Jamoma/Core/DSP/extensions/EffectsLib/build/libEffectsLib-i386.a
EXTENSION: /Volumes/Storage/xcode_projects/Jamoma/Core/DSP/extensions/EffectsLib/build/libEffectsLib-x86_64.a
EXTENSION: /Volumes/Storage/xcode_projects/Jamoma/Core/DSP/extensions/EffectsLib/build/libEffectsLib.a
JamomaDSP -- Version 0.6
overdrive : No Tests have been written for this class -- please supply a test method.
/bin/sh: line 1:  2584 Bus error: 10           build/test32
make: *** [build_and_test] Error 138
Command /usr/bin/make failed with exit code 2
nwolek commented 11 years ago

changes made to close #173 still need to be refined for this situation.

the makefiles have proper dependencies in these situations: libraries that sits at the top level of Core extensions to the Foundation

the makefiles will NOT have proper dependencies in these situations: extensions to any library other than Foundation

I've got some work to do here: https://github.com/jamoma/JamomaCore/blob/feature/dictionary-rewrite/Shared/jamomalib.rb#L1757

nwolek commented 11 years ago

Dug into the DataspaceLib this morning to understand how testing that extension to Foundation works. Discover it was not working properly, but corrected the issues with commits fb09ae0, 3f0273d, b80a7c3. I think the lessons learned will help me solve this issue (eventually).

nwolek commented 10 years ago

As of commit 0e94212, still seeing error 138 when I build with testing.

tap commented 10 years ago

To debug:

  1. In the Makefile, in the "install" target at the bottom, change this: install: | build_and_test to this: install: | notest

That makes it build, and it builds the test, but it does not run the test.

  1. In the scheme set a custom executable to be the test binary.

Then you can run the test program in the debugger and the problem was immediately obvious.

However, there was a hiccup in that the dependencies are not correctly written to the notest target by the ruby script. I will fix that shortly.

There is another problem too. The test for TTPulseSub crashes because of dependencies on the MathLib -- I think the MathLib should just be merged into the DSP library to fix that.

tap commented 10 years ago

We should be good here now. Please take a look @nwolek and let me know how you make out...

nwolek commented 10 years ago

I will look at it in the morning. Wednesday morning is my regular appointment with Jamoma. ;)

nwolek commented 10 years ago

confirmed. this is now working as of commit 852b919! THANKS TIM!!!