coveralls.io (or any other): coverage of generated files (which are not in git) - code-coverage

I am searching for any coverage report host/service/web which can visualize coverage for generated files.
I am currently using coveralls.io and it seems that it can not handle generated files and I do not know how to post them to coveralls.io so they can be viewed.
Source Not Available
The file "..." isn't available on github.
Either it's been removed, or the repo root directory needs to be updated.
https://coveralls.io/builds/25612947/source?filename=include/hdlConvertor/verilogPreproc/verilogPreprocParser/verilogPreprocParserBaseVisitor.h
Generated files may change build to build and are very large and I simply can not add them to git. But I need to know the coverage.
Currently I am only able to watch coverage for generated files locally.
I know the list of generated files and I can upload them during the build If I know where.

Related

Project relative paths in cypress code coverage

I'm using Cypress for client e2e testing and #cypress/code-coverage for reports. I have a monorepo, client and server folders. Each one generates its own coverage report (lcov.info). I am using CodeClimate for keeping track o total coverage. It provides a tool to merge multiple reports into one, and then upload it
The problem is that both reports have relative paths (regarding the tested files) to is service, so /client/coverage/lcov.info does not build path as 'client/component/index.ts' but /component/index.ts so report merging fails
I can fix this on the server side passing some options to jest-conf, but I didnt fine nothing related to cypress. I can generate the report folder/files in the root level passing an option to nyc (which is used under to hood by #cypress/code-coverage), but the paths are still relatives to the client folder.
Has anyone experienced this issue? Help much appreciated

Running T4 TextTemplating on Build server resulting to shelveset

We are using T4ToolBox / TextTemplating.15.0 for generating part of the code based on models. Unfortunately it is slow and unstable on local workstations more and more as the project grow.
I am trying to move this process to TFS server and the target is the following process:
after checkin on TFS in specified folder (where the models are) the
custom tool should run on specified .tt files
a shelveset should be created from generated files
and finally email sent about result
My biggest problems is the following: how to genereate code, exclude these files from checkin (because additional code review is necessary as it may broke the main build) and create shelveset.
Any help is really appreciated, thank you in advance!
If you mean perform text transformation as part of a build process, you can refer to Generate files with the TextTransform utility and Code generation in a build process for details.
To exclude these files from checkin you can create a .tfignore file for TFVC or .gitignore file for Git.
To create the shelveset, you can use the Shelvesets Command

MSBuild Logging

I am relatively new to tfs. I am creating msbuild logfiles during a build, but they are not getting moved to the drop location.
I am attempting to move a teambuild from 2010 to 2013. Due to versioned namespaces, I recreated the workflow template from a fresh default from the tfs server. The build is successful and the binaries are placed in the drop location via custom activity.
MSBuild is used four times on the workflow. Each has a unique LogFile name and use the same LogFileDropLocation. I get the binaries without the logfiles in the drop location. Using a diagnostic build, I do see that LogFileDropLocation has the correct drop location. However, my log files remain on the agent and do not get moved to the drop.
In the 2010 build, I get binaries and four logfiles in the drop location.
My question is, should Microsoft.Teamfoundation.Build.Workflow.Activities.MSBuild handle the copy/move of the log files, as I suspect, or later in the workflow? MSDN and the several books I have don't actually discuss how msbuild handles the logging. I am hoping someone knows specifically how MSBuild handles the logfile.
You need to put the XML files in your project and mark them as Content. They will be copied to the bin folder as output.
Example: Create a new project in visual studio. Them create an empty .xml file in the root of the project under source control. Right click and mark it as Content. Build the project.
You should see the bin folder has been created and the .xml file has been copied to that location.
This output is considered "compiled" or "generated" even though it is a copy. You may want to do some build processing to add parameters later.
When calling the MSBuild utility you can add parameters and have MSBuild handle the log file the way you want. I don't know the TFS workflow you've described so see how you could add that there.
You command can look something like this:
MSBuild.exe /target:Build Solution.sln /filelogger /fileloggerparameters:LogFile=C:\path\to\file\build.log;Verbosity=normal
Loggers are explained here (under Switches for Loggers): https://msdn.microsoft.com/en-us/library/ms164311.aspx
Verbosity is explained here: https://msdn.microsoft.com/en-us/library/microsoft.build.framework.loggerverbosity.aspx

TFS - Workspace to build definition with only required files

In our project we are building project with TFS build definition feature.In TFS build definition there is one option like "workspace" where we mention all require folders which contains file which used to build project successfully. We have separate folders as per requirements which contain different units. this units are in large numbers hence when we build project and mention any folder in workspace then it extract all files in that particular folder. actually we require only few of them for project build because we used different files per project but that files under same roof.
could any one help us that how we build our project with only require files in workspace rather than whole folder?
Status =Active Source control folder =$/Artiion/ADO/LibForms/Loginf.pas: Build agent Folder=$(SourceDir)\LibForms\Loginf.pas
above example works fine
There is no reasonable way to do this. When you tell TFS Build what source folders to use, that is what you are telling it: get these folders. In theory I suppose you could modify or write your own process template and provide custom fields in which you could provide data to the build process about what files you need for that build, and then create some custom action to call out that would then replace the standard TFS Get function in the process template. But what would be the purpose? If you have certain files that are to be included in the solution build, then simply have separate solutions or projects which would include the appropriate files. Then build the specific solution based on which subcomponents you need, and then only those files will be built and copied to the drop location. Sure, they would still have been retrieved in the build agent's workspace, but they would not have been used in the actual build or placed in the drop location. If that's not good enough, and you need to actually Get different groups of files per build, then you should rearrange your files so that the necessary files are in the appropriate subfolders.

TeamCity Artifacts and checkout rules and TFS (Oh my!)

Having real problems creating artifacts in teamcity 6.5 (using TFS & MSBuild as the buildrunner if it makes any odds, which it probably does as any examples I find seem to use SVN...).
The Build works, so long as I enter no checkout rules.
If I understand it, I'll need to set up some artifacts, that themselves rely on checkout rules(?).
I have two builds that are identical other than the way they are kicked off.
One is initiated on check-in
One is initiated manually from within TC. This build is the Test Build
Assembly version numbers come from a single versioninfo.cs file that is a linked file in all projects in the solution. This method is detailed here : http://www.codeproject.com/Articles/328977/The-Right-Way-to-Version-Your-Assemblies and holds the version number thus:
[assembly: AssemblyFileVersion("9.1.0.0")]
Ultimately, I'm unable to copy the output of the test build to another location.
As it stands, the only output of a build is in the teamcity data directory, for example :
C:\TeamCity\buildAgent\work\ceaaf65dc87ff856\Project1\bin\Debug
C:\TeamCity\buildAgent\work\ceaaf65dc87ff856\Project2\bin\Debug
etc
I'd like to copy the output files (exes and DLLs) to an output folder which has the build number of the build on it
For arguments sake, lets say for the version number above, this would be to
c:\BuildServer_Output\SolutionName\9.1.0.0
Currently I have not been able to create artifact paths that actually do anything - i.e. to copy anything anywhere.
For instance I have acoupe of artifact paths, but nothing ever gets put into C:\BuildServer_TestBuilds -
+:Accounts\bin\debug* => C:\BuildServer_TestBuilds
+:BackOffice\bin\debug* => C:\BuildServer_TestBuilds
Am I getting no artifacts (and my artifact paths therefore ignored) because I have no checkout rules?
Any help would be appreciated.
I am pretty sure artifacts and checkout rules are completely independent. Artifacts just deal with what has been built. Checkout rules tell teamcity how to react to and checkout changes in the VCS.
It looks like your artifact paths are beginning with absolute paths. I have always found it easier to use relative paths with wildcards. That way I don't need to worry about where teamcity put the build. We use the following to get all dlls and exes to one folder
**\bin\Debug\*.*=>deploymentdir
Our build configuration page has an artifacts link and when we open it it will have things like
deploymentdir\common\bin\debug\common.dll
deploymentdir\common\bin\debug\common.pdb
deploymentdir\runner\bin\debug\runner.exe
In one of our other builds we use an msbuild script to flatten our output before putting it through the artifact process.
We do use checkout rules but we have not had to change our artifact paths to accommodate them.

Resources