Skip to content
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

Disable P2 mirrors by default #3269

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,10 @@ public void testPropertyPropagation() throws Exception {
assertTrue(properties.containsKey(TychoConstants.PROP_PGP_SIGNATURES)
&& !properties.get(TychoConstants.PROP_PGP_SIGNATURES).isBlank());
}

@Override
protected boolean isDisableMirrors() {
// we want to test mirror properties...
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ protected Verifier getVerifier(String test, boolean setTargetPlatform, File user

Verifier verifier = new Verifier(testDir.getAbsolutePath());
verifier.setForkJvm(isForked());
if (isDisableMirrors()) {
verifier.setSystemProperty("tycho.disableP2Mirrors", "true");
}
String debug = System.getProperty("tycho.mvnDebug");
if (debug != null) {
System.out.println("Preparing to execute Maven in debug mode");
Expand Down Expand Up @@ -146,6 +149,14 @@ protected Verifier getVerifier(String test, boolean setTargetPlatform, File user

}

/**
* can be overridden by subclass to explicitly enable mirrors, by default they are disabled.
*
*/
protected boolean isDisableMirrors() {
return true;
}

protected boolean isForked() {
return true;
}
Expand Down
Loading