Month Two, Week Two
Issues With Merging Unit Test and Main Development Repository
Author: Nic Russell
Posted: 5 May 2017
My first task this week was to incorporate our Unit Tests from our Test Suite into our main Gateware repository so that the tests are closer to the source code they depend on. Also, this will allow us to automatically build the Unit Tests after each build of the libraries which will ensure our tests and libraries are always up to date with each other.
The issue at the moment is that the library and include directories have changed significantly because of the new file structure of the Gateware repository. The Visual Studio solution was not looking in the correct place for the libraries once they were built and therefore could not build its own source code. I have never had so many separate projects with their own build settings and esoteric preferences in the same solution before, and it is difficult to keep them all in order.
The problem is that the Gateware repo was never designed to have another solution added to it, so the file structure has become a little muddled and I am still working with it to try and find a stable, easy to navigate structure. One issue I had was with the #include directories. The new structure of the repo made the old #include directory path deprecated, requiring me to remove some "..\..\" to get the path to look in the right repository. I then had to use more relative pathing in the source code itself to fix the #include path.
The next issue will be almost certainly be solved somewhere in the project settings, because the error I am currently getting is that the file "Gfile.lib" cannot be opened. First, I checked the lib directories and saw that the relative pathing was looking much too far back into the repository, to the point where it was looking for .lib's on my desktop. After taking out a few "..\..\" I was sure the path was correct because I could see the necessary .lib's and .dll's inside the folder I pathed to. However, The error was still occurring, so I began meticulously checking the Test Suite preferences to make sure any changes there were reflected in the new Gateware repo. After that, the error was still occurring. I have since added additional lib paths in the preferences. I started taking out .lib's and .dll's from the working Test Suite to try to mimic the error in the working repo, which I was able to do. The error would occur when the Library Directory preference was not set correctly, meaning it could not find the .lib. However, the current Library Directory IS looking at the correct .lib's, so at the moment I am a little lost.
As I keep working on this I plan on trying to try using preprocessor definitions to set up the lib paths and hopefully that will be more explicit linking and the project will find the correct libs.
No comments:
Post a Comment