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

Drop glib dependency for unit tests #159

Closed
nemequ opened this issue Nov 9, 2015 · 9 comments
Closed

Drop glib dependency for unit tests #159

nemequ opened this issue Nov 9, 2015 · 9 comments

Comments

@nemequ
Copy link
Member

nemequ commented Nov 9, 2015

This would make Windows, where things are more complicated than just apt-get install libglib2.0-dev or dnf install glib2-devel, much easier to deal with.

tinycthread has a very rudimentary test runner we could steal (unless I can find something better). Some modifications would probably be necessary, but it's doable.

@jibsen
Copy link
Collaborator

jibsen commented Nov 10, 2015

There are tons of unit test libraries available with varying levels of functionality.

I've used greatest before when I just needed to run simple tests.

@nemequ
Copy link
Member Author

nemequ commented Jan 11, 2016

I ended up putting together a small framework called µnit. I'm still working on the API in a couple places, but I think it's mostly ready to go. I'll start working on porting over the existing tests soon.

@jibsen
Copy link
Collaborator

jibsen commented Jan 11, 2016

I noticed it yesterday, looks interesting 👍.

@nemequ
Copy link
Member Author

nemequ commented Jan 17, 2016

@jibsen, when you have some free time, would you be willing to take a look at AppVeyor for the wip/munit branch? It builds fine, but execution doesn't work; I think it's just a small issue with CMake, but it's a bit tricky to debug just by looking at the AppVeyor output.

FWIW I'd prefer to just have tests/test-squash.exe executed instead of going through ctest for AppVeyor, but make test needs to work regardless…

@jibsen
Copy link
Collaborator

jibsen commented Jan 17, 2016

The test should run on AppVeyor now, but they crash with MSVC due to a call to squash_get_codec passing NULL. I don't have time to look into it right now, but the tests appear to run reasonably with MinGW, so it must be something MSVC specific.

@nemequ
Copy link
Member Author

nemequ commented Jan 17, 2016

Thanks! I'll look into it tomorrow. I suspect it's not seeing the plugins, which is interesting…

The mingw build doesn't actually run the tests; that would require installing wine, which wants to pull in the whole graphical stack.

@jibsen
Copy link
Collaborator

jibsen commented Jan 17, 2016

I suspect you are right.

Rearding MinGW, I meant locally on my machine. Compiling with mingw-w64 the new tests run, and tests 14 and 15 segfault on the ms-compress plugin. Perhaps it is the stack usage issue again.

@jibsen
Copy link
Collaborator

jibsen commented Jan 17, 2016

The tests are running now.

Looks like I accidentally pushed some code to increase the stack limit along with the fix for the plugin path in 6656416.

@jibsen
Copy link
Collaborator

jibsen commented Jan 17, 2016

The crash in lzg appears to have been fixed upstream.

Looks like I was wrong, I filed a PR (mbitsnbites/liblzg/pull/4).

@nemequ nemequ closed this as completed Jan 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants