Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests do not compile and fail on Linux #11

Open
nolanhergert opened this issue Feb 17, 2015 · 2 comments
Open

Tests do not compile and fail on Linux #11

nolanhergert opened this issue Feb 17, 2015 · 2 comments

Comments

@nolanhergert
Copy link

There are two issues.

1. gtest.h requires pthread support

Fix: Add pthread support flag to Makefile
Specifically, I appended "-pthread" to the CXXFLAGS option (line 59) of firmware/test/nbproject/Makefile-Debug.mk. One should also add this to the release build appropriately.

2. Some tests fail

"dist/Debug/MinGW-Windows/test"
[==========] Running 145 tests from 15 test cases.
[----------] Global test environment set-up.
[----------] 9 tests from CircularBufferTest
[ RUN      ] CircularBufferTest.CannotReadWhenEmpty

    [       OK ] CircularBufferTest.CannotReadWhenEmpty (0 ms)
.
.
.

[----------] 6 tests from CreateFSTest
[ RUN      ] CreateFSTest.FilesystemIsPersisted
Created filesystem
Created file
asserted File exists
Created filesystem2
Created checkFileExists
[       OK ] CreateFSTest.FilesystemIsPersisted (1 ms)
[ RUN      ] CreateFSTest.FilesystemIsPersisted2
Segmentation fault (core dumped)
make: *** [test] Error 139
@nolanhergert
Copy link
Author

For the first item, is it appropriate to add -pthread to both Makefile-Debug and Makefile-Release? I am just hoping it won't screw up things for other OS's as you Matt obviously didn't need it.

@m-mcgowan
Copy link
Owner

I'll try adding pthread when I'm working on this library next. I don't think it will have any affect on other platforms, where it's probably (hopefully!) just ignored. I've not yet tried flashee on OSX, which is now my day-to-day platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants