-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test to check if the "build.properties" file is missing in jpf.jar #75
Comments
Reminder: there is a |
After adding a minimal main to debug
I guess the way to work on this issue is to create a Note that without these mocked @cyrille-artho and @wvisser - I guess just checking if both paths exist doesn't justify a new test in the test suite. I will work on my suggestion (ReportTest + mocked files) and submit a pull request for review, ok? |
Hi Jeanderson,
One way to do this could be a test that fails if either file is missing.
That would require getting the hash to work again (this stopped working when hg was replaced by git) for the test to pass.
…--
Regards,
Cyrille Artho
On Jun 4, 2018, at 16:49, Jeanderson Barros Candido ***@***.***> wrote:
After adding a minimal main to debug gov.nasa.jpf.report.Reporter (check here), I noticed that getRepositoryInfo() is called only in getJPFBanner():
public String getJPFBanner () {
// ...
String rev = getRevision();
if (rev != null){
sb.append(" (rev ");
sb.append(rev);
sb.append(')');
}
// ...
if (conf.getBoolean("report.show_repository", false)) {
String repInfo = getRepositoryInfo();
if (repInfo != null) {
sb.append( repInfo);
}
}
return sb.toString();
}
getRevision() reads a hash from .version (currently missing) and a similar thing goes with getRepositoryInfo() with build.properties (reads outdated info from an old .version file in the repository).
I guess the way to work on this issue is to create a ReportTest test and maybe add a mocked .version and build.properties file to test wheater getRespositoryInfo and getRevision output what is expected to output.
Note that without these mocked .version and build.properties file, we will have a test that won't be able to do much except check if the path .../.../.version and .../.../.../build.properties exists: both files are "revision-dependent".
@cyrille-artho and @wvisser - I guess just checking if both paths exist doesn't justify a new test in the test suite. I will work on my suggestion (ReportTest + mocked files) and submit a pull request for review, ok?
―
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Great job, thanks! |
As discussed with @cyrille-artho, we should add a test to verify if an expected
build.properties
file is missing injpf.jar
file.The text was updated successfully, but these errors were encountered: