Skip to content

Commit

Permalink
Remove RepoReporApplication -newAPI flag support
Browse files Browse the repository at this point in the history
This has never really been used and is actually older than "old"
checkers.
  • Loading branch information
akurtakov committed Jun 15, 2023
1 parent eeae58e commit 4005533
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 87 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,7 @@ public Object start(IApplicationContext context) throws Exception {
// we'd know exactly what failed.
// but for now, all "tests" return "not failed"
Stopwatch stopwatch = Stopwatch.createStarted();
boolean testfailures = false;
if (configurations.getUseNewApi()) {
Stopwatch additionalReports = Stopwatch.createStarted();
System.out.println("Using new API.");
new P2RepositoryCheck().runChecks(configurations);
System.out.println("Additional reports. Took: " + additionalReports);
} else {
testfailures = new BuildRepoTests(configurations).execute();
}
boolean testfailures = new BuildRepoTests(configurations).execute();
stopwatch.stop();
if (testfailures) {
appresult = Integer.valueOf(-1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ public final class RepoTestsConfiguration implements IP2RepositoryAnalyserConfig
public static final String REFERENCE_REPO_PARAM = "referenceRepo";
public static final String REPO_URL_PARAM = "repoURLToTest";
public static final String REFERENCE_REPO_URL_PARAM = "repoURLForReference";
public static final String USE_NEW_API = "useNewApi";

private String referenceRepoDir;
private String reportOutputDir;
private String reportRepoDir;
private String tempWorkingDir;
private String repoURLToTest;
private String repoURLForReference;
private Boolean useNewApi;

/**
* @param reportRepoDir
Expand Down Expand Up @@ -104,30 +102,9 @@ public static RepoTestsConfiguration createFromSystemProperties() {
if (outDir == null || outDir.isEmpty()) {
outDir = System.getenv(REPORT_OUTPUT_DIR_PARAM);
}
String usenew = System.getProperty(USE_NEW_API, null);
if (usenew == null || outDir.isEmpty()) {
usenew = System.getenv(USE_NEW_API);
}
String tmpDir = System.getProperty("java.io.tmpdir");
String refRepoDir = System.getProperty(REFERENCE_REPO_PARAM, null);
RepoTestsConfiguration configuration = new RepoTestsConfiguration(repoDir, outDir, refRepoDir, tmpDir);
configuration.setUseNewImpl(Boolean.valueOf(usenew));
return configuration;
}

/**
* @return <code>true</code> if new common impl should be used
*/
public Boolean getUseNewApi() {
return useNewApi;
}

/**
* @param useNewImpl
* use new common impl
*/
public void setUseNewImpl(Boolean useNewImpl) {
this.useNewApi = useNewImpl;
return new RepoTestsConfiguration(repoDir, outDir, refRepoDir, tmpDir);
}

@Override
Expand Down

0 comments on commit 4005533

Please sign in to comment.