Do we need all those "Static" test cases?
- Michael Sherman
- Posts: 806
- Joined: Fri Apr 01, 2005 6:05 pm
Do we need all those "Static" test cases?
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
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
- Ayman Habib
- Posts: 2238
- Joined: Fri Apr 01, 2005 12:24 pm
RE: Do we need all those "Static" test cases?
Sherm,
Did you, or are you aware of anybody else that uses the static libraries?
-Ayman
Did you, or are you aware of anybody else that uses the static libraries?
-Ayman
- Peter Eastman
- Posts: 2564
- Joined: Thu Aug 09, 2007 1:25 pm
RE: Do we need all those "Static" test cases?
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
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
- Michael Sherman
- Posts: 806
- Joined: Fri Apr 01, 2005 6:05 pm
RE: Do we need all those "Static" test cases?
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.
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.
- Peter Eastman
- Posts: 2564
- Joined: Thu Aug 09, 2007 1:25 pm
RE: Do we need all those "Static" test cases?
I have no problem debugging shared libraries on a Mac.
Peter
Peter
- Ayman Habib
- Posts: 2238
- Joined: Fri Apr 01, 2005 12:24 pm
RE: Do we need all those "Static" test cases?
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
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
- Michael Sherman
- Posts: 806
- Joined: Fri Apr 01, 2005 6:05 pm
RE: Do we need all those "Static" test cases?
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
Sherm
- Peter Eastman
- Posts: 2564
- Joined: Thu Aug 09, 2007 1:25 pm
RE: Do we need all those "Static" test cases?
Developers who are on Mac or Linux? ![Smile :)](./images/smilies/icon_e_smile.gif)
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
![Smile :)](./images/smilies/icon_e_smile.gif)
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
- Ayman Habib
- Posts: 2238
- Joined: Fri Apr 01, 2005 12:24 pm
RE: Do we need all those "Static" test cases?
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
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
- Michael Sherman
- Posts: 806
- Joined: Fri Apr 01, 2005 6:05 pm
RE: Do we need all those "Static" test cases?
> 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?
Well, I wasn't thinking about that initially by I *think* that's what Ayman is saying -- is that right?