I have been using SasUnit for a few months and am finding it to be a fantastic tool. Thanks for creating it!
I would like to use the coverage feature, but whenever I set SASUNIT_COVERAGEASSESSMENT=1 in the cmd file, I get "File is in use" errors in the test case logs. The errors have to do with files with names like "001.tcg" and "002.tcg".
Here are two examples of the error messages from a recent test run:
ERROR: File is in use, C:\Users\dhopkins\Documents\CVSWorkspace\Projects\Project1\TestReport\log\001.tcg.
WARNING: Generation of coverage data has been suspended and OPTION NOCOVERAGE has been set.
To generate coverage data again, set OPTIONS MCOVERAGE.
ERROR: File is in use, C:\Users\dhopkins\Documents\CVSWorkspace\Projects\Project1\TestReport\log\002.tcg.
WARNING: Generation of coverage data has been suspended and OPTION NOCOVERAGE has been set.
Is there something I can to do in the SasUnit configuration to fix this problem? I am using SasUnit version 1.3, with SAS 9.3 (on Windows).
if You are using PROC FCMP functions that include a call to the run_macro funtions in your progams, then we have already a solution for this error. See the discussion in ticket 152 [bugs:#152].
When a macro is called from an FCMP function this error occurs. PROC FCMP is run in a parallel process and tries to write into the same coverage log file as the originating process. So the solution is to stop mcoverage prior to FCMP run_macro. And to revoke it afterwards.
%let mcoverage=%sysfunc(getoption(mcoverage)); options nomcoverage;
Call to FCMP run_macro options &mcoverage.;
If this doesn't help please post a more detailed error message from the log file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2015-01-26
Thanks for the response.
You were correct, I am using PROC FCMP. I applied your solution, and that got rid of the "File is in use" errors.
However, I have two remaining problems.
I am now getting a new error. Several times while SASUnit is running, a SAS Message Log appears with the message "ERROR: Generic critical error". I close each of these windows, and SASUnit runs to completion.
The SASUnit output looks correct, except that on the "Units under Test" tab, the cells in the "Test Coverage [%]" column are all blank. Shouldn't there be values there, now that the coverage feature is turned on?
I haven't had time to do any troubleshooting of these new problems. If you happen to have any further hints to resolve them, I would love to hear them.
Thanks again for your help.
Don Hopkins
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have been using SasUnit for a few months and am finding it to be a fantastic tool. Thanks for creating it!
I would like to use the coverage feature, but whenever I set SASUNIT_COVERAGEASSESSMENT=1 in the cmd file, I get "File is in use" errors in the test case logs. The errors have to do with files with names like "001.tcg" and "002.tcg".
Here are two examples of the error messages from a recent test run:
ERROR: File is in use, C:\Users\dhopkins\Documents\CVSWorkspace\Projects\Project1\TestReport\log\001.tcg.
WARNING: Generation of coverage data has been suspended and OPTION NOCOVERAGE has been set.
To generate coverage data again, set OPTIONS MCOVERAGE.
ERROR: File is in use, C:\Users\dhopkins\Documents\CVSWorkspace\Projects\Project1\TestReport\log\002.tcg.
WARNING: Generation of coverage data has been suspended and OPTION NOCOVERAGE has been set.
Is there something I can to do in the SasUnit configuration to fix this problem? I am using SasUnit version 1.3, with SAS 9.3 (on Windows).
Thank you,
Don Hopkins
Don Hopkins
Senior Consultant
d-Wise, 1500 Perimeter Park Dr., Suite 150, Morrisville, NC 27560
Office: 919-334-6085 | Mobile: 919-724-9845 | Don.Hopkins@d-wise.comDon.Hopkins@d-wise.com | www.d-wise.comhttp://www.d-wise.com/
Systems Integration/Implementationhttp://www.d-wise.com/systems-implementation/ | Clinical Standardshttp://www.d-wise.com/standards-implementation/ | Data Warehousinghttp://www.d-wise.com/data-warehouses | Process Optimizationhttp://www.d-wise.com/process-optimization
[logo] http://www.d-wise.com/ [linkedin] http://www.linkedin.com/company/d-wise-technologies-inc. [twitter] https://twitter.com/dWiseTech [facebook] http://www.facebook.com/pages/d-Wise/192271367572620 [gplus] https://plus.google.com/110677134153265651960/posts [myprofile] http://www.linkedin.com/in/hopkinsdon
Hello Don Hopkins,
if You are using PROC FCMP functions that include a call to the run_macro funtions in your progams, then we have already a solution for this error. See the discussion in ticket 152 [bugs:#152].
When a macro is called from an FCMP function this error occurs. PROC FCMP is run in a parallel process and tries to write into the same coverage log file as the originating process. So the solution is to stop mcoverage prior to FCMP run_macro. And to revoke it afterwards.
%let mcoverage=%sysfunc(getoption(mcoverage));
options nomcoverage;
Call to FCMP run_macro
options &mcoverage.;
If this doesn't help please post a more detailed error message from the log file.
Kind regards
Klaus Landwich
Related
Tickets:
#152Thanks for the response.
You were correct, I am using PROC FCMP. I applied your solution, and that got rid of the "File is in use" errors.
However, I have two remaining problems.
I am now getting a new error. Several times while SASUnit is running, a SAS Message Log appears with the message "ERROR: Generic critical error". I close each of these windows, and SASUnit runs to completion.
The SASUnit output looks correct, except that on the "Units under Test" tab, the cells in the "Test Coverage [%]" column are all blank. Shouldn't there be values there, now that the coverage feature is turned on?
I haven't had time to do any troubleshooting of these new problems. If you happen to have any further hints to resolve them, I would love to hear them.
Thanks again for your help.
Don Hopkins