Do we need all those "Static" test cases?

SimTKcore exists as a separate project to provide 'one stop shopping' for SimTK Core software and support, although the software is actually developed as a set of interdependent projects. SimTK 1.0 was released in March 2008, SimTK 2.0 in December, 2009.
User avatar
Michael Sherman
Posts: 806
Joined: Fri Apr 01, 2005 6:05 pm

Do we need all those "Static" test cases?

Post by Michael Sherman » Wed Dec 03, 2008 1:46 pm

I'm not sure who's monitoring this forum since it doesn't appear to have been used yet. But in case this is the right place for SimTK Core developer discussions ...

We now have *lots* of test cases and every one comes in two flavors: shared and static. What do you think about eliminating most of the static tests and replacing them in each project with just a single "TestStatic" or something like that to make sure we can link successfully with the static library? It seems excessive to run every test both ways, and of course the links with static libraries take much longer and create gigantic binaries.

Sherm

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

RE: Do we need all those "Static" test cases?

Post by Ayman Habib » Wed Dec 03, 2008 3:25 pm

Sherm,

Did you, or are you aware of anybody else that uses the static libraries?

-Ayman

User avatar
Peter Eastman
Posts: 2564
Joined: Thu Aug 09, 2007 1:25 pm

RE: Do we need all those "Static" test cases?

Post by Peter Eastman » Wed Dec 03, 2008 4:09 pm

You'd expect that the static and dynamic versions of a test would always produce the same result, but that's not always the case. Which is, of course, the reason for having both of them in the first case. On the other hand, when that happens, it's more often the dynamic one that fails.

So how about this: keep all the cmake code in place for creating both versions, but make it conditional on a build variable that defaults to false. So most of the time we won't be building the static versions of all the test cases, but we can manually build and run them before each release just in case.

Peter

User avatar
Michael Sherman
Posts: 806
Joined: Fri Apr 01, 2005 6:05 pm

RE: Do we need all those "Static" test cases?

Post by Michael Sherman » Thu Dec 04, 2008 1:04 pm

Ironically after posting this I immediately ran into a case where *only* the static tests failed. That was yesterday. Then today I was trying to debug another test case and found that in Visual Studio Debug mode I couldn't see internal class definitions inside the shared libraries, but could if I stepped through the static version of the same test. Is that also a problem with Linux or Mac, or can you debug your way down through any shared library and still see its source?

It is possible that we're not installing enough debug information with the Windows Debug DLLs but right now I'm feeling more affectionate towards the static builds.

User avatar
Peter Eastman
Posts: 2564
Joined: Thu Aug 09, 2007 1:25 pm

RE: Do we need all those "Static" test cases?

Post by Peter Eastman » Thu Dec 04, 2008 1:09 pm

I have no problem debugging shared libraries on a Mac.

Peter

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

RE: Do we need all those "Static" test cases?

Post by Ayman Habib » Thu Dec 04, 2008 1:49 pm

Sherm,

Showing info inside the debugger is definitely good enough reason for me personally to have static libs. I don't think though that this would justify installing it every time for all developers on all platforms.

One reason I feel bad about it is that many of our "developers" will have almost double the build/test time without knowing clearly what these libraries are for or using them ever!. That's why I'd prefer a CMake option as Peter suggested.

-Ayman


User avatar
Michael Sherman
Posts: 806
Joined: Fri Apr 01, 2005 6:05 pm

RE: Do we need all those "Static" test cases?

Post by Michael Sherman » Thu Dec 04, 2008 1:52 pm

Ayman, what developers are you thinking of that wouldn't want static libraries? I would think that developers would almost by definition need to do debugging.

Sherm

User avatar
Peter Eastman
Posts: 2564
Joined: Thu Aug 09, 2007 1:25 pm

RE: Do we need all those "Static" test cases?

Post by Peter Eastman » Thu Dec 04, 2008 2:12 pm

Developers who are on Mac or Linux? :)

But actually I don't think that's relevant. I don't think we're talking about not building static libraries, are we? Just not building static versions of our test cases. And I don't think most outside developers are going to be too worried about debugging those.

Peter

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

RE: Do we need all those "Static" test cases?

Post by Ayman Habib » Thu Dec 04, 2008 2:14 pm

Sherm,

The ones I'm thinking of are researchers/students either in our lab or collaborators who needed to build OpenSim and simtkcore libraries from sources (following a recipee). They normally end up debugging their own code.

-Ayman

User avatar
Michael Sherman
Posts: 806
Joined: Fri Apr 01, 2005 6:05 pm

RE: Do we need all those "Static" test cases?

Post by Michael Sherman » Thu Dec 04, 2008 3:02 pm

> I don't think we're talking about not building static libraries, are we?

Well, I wasn't thinking about that initially by I *think* that's what Ayman is saying -- is that right?

POST REPLY