Skip to content

Commit 7e913bf

Browse files
committed
Always expect executable to be available in pde.build.tests
1 parent ff2fa83 commit 7e913bf

5 files changed

Lines changed: 7 additions & 37 deletions

File tree

build/org.eclipse.pde.build.tests/src/org/eclipse/pde/build/internal/tests/AssembleTests.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
package org.eclipse.pde.build.internal.tests;
1515

1616
import static org.junit.Assert.assertEquals;
17-
import static org.junit.Assert.assertNotNull;
1817

1918
import java.io.File;
2019
import java.util.HashSet;
@@ -33,7 +32,6 @@ public void testCustomAssembly() throws Exception {
3332
IFolder buildFolder = newTest("customAssembly");
3433

3534
File executable = Utils.findExecutable();
36-
assertNotNull(executable);
3735

3836
Utils.generateFeature(buildFolder, "sdk", null, new String[] { "org.eclipse.swt;unpack=\"false\"",
3937
"org.eclipse.swt.win32.win32.x86_64;unpack=\"false\";os=\"win32\";ws=\"win32\";arch=\"x86_64\"" });
@@ -63,7 +61,6 @@ public void testBug179612_default() throws Exception {
6361
IFolder buildFolder = newTest("179612");
6462

6563
File executable = Utils.findExecutable();
66-
assertNotNull(executable);
6764

6865
Utils.generateFeature(buildFolder, "sdk", null,
6966
new String[] { "org.eclipse.swt;unpack=\"false\"",
@@ -92,7 +89,6 @@ public void testBug179612_custom() throws Exception {
9289
IFolder buildFolder = newTest("179612_custom");
9390

9491
File executable = Utils.findExecutable();
95-
assertNotNull(executable);
9692

9793
Utils.generateFeature(buildFolder, "sdk", null,
9894
new String[] { "org.eclipse.swt;unpack=\"false\"",
@@ -131,7 +127,6 @@ public void testBug196754() throws Exception {
131127
"org.eclipse.equinox.launcher.win32.win32.x86_64;unpack=\"false\"" });
132128

133129
File executable = Utils.findExecutable();
134-
assertNotNull(executable);
135130

136131
Properties buildProperties = BuildConfiguration.getBuilderProperties(buildFolder);
137132
buildProperties.put("archivesFormat", "*, *, * - folder");
@@ -156,7 +151,6 @@ public void testBug211605() throws Exception {
156151
IFolder buildFolder = newTest("211605");
157152

158153
File executable = Utils.findExecutable();
159-
assertNotNull(executable);
160154

161155
Utils.generateFeature(buildFolder, "sdk", null,
162156
new String[] { "org.eclipse.swt;unpack=\"false\"",

build/org.eclipse.pde.build.tests/src/org/eclipse/pde/build/internal/tests/ProductTests.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ public void offBug192127() throws Exception {
6767
IFolder containerFeature = Utils.createFolder(buildFolder, "features/org.eclipse.pde.build.container.feature");
6868

6969
File executable = Utils.findExecutable();
70-
assertNotNull(executable);
7170

7271
// Exporting from the UI gives the container feature some /Eclipse.App root
7372
// files
@@ -112,7 +111,6 @@ public void test218878() throws Exception {
112111
IFolder buildFolder = newTest("218878");
113112

114113
File executable = Utils.findExecutable();
115-
assertNotNull(executable);
116114

117115
Properties properties = BuildConfiguration.getBuilderProperties(buildFolder);
118116
properties.put("product", "acme.product");
@@ -148,7 +146,6 @@ public void test234032() throws Exception {
148146
IFolder buildFolder = newTest("234032");
149147

150148
File executable = Utils.findExecutable();
151-
assertNotNull(executable);
152149

153150
Properties properties = BuildConfiguration.getBuilderProperties(buildFolder);
154151
properties.put("product", "test.product");
@@ -172,8 +169,7 @@ public void test234032() throws Exception {
172169
public void test237922() throws Exception {
173170
IFolder buildFolder = newTest("237922");
174171

175-
File executable = Utils.findExecutable();
176-
assertNotNull(executable);
172+
Utils.findExecutable();
177173

178174
Utils.generateFeature(buildFolder, "F", null, new String[] { "rcp" });
179175
Properties featureProperties = new Properties();
@@ -252,7 +248,6 @@ public void test237747() throws Exception {
252248
IFolder buildFolder = newTest("237747");
253249

254250
File executable = Utils.findExecutable();
255-
assertNotNull(executable);
256251

257252
IFolder fooFolder = Utils.createFolder(buildFolder, "plugins/foo");
258253
Utils.generateBundle(fooFolder, "foo");
@@ -278,7 +273,6 @@ public void testBug238001() throws Exception {
278273
IFolder buildFolder = newTest("238001");
279274

280275
File executable = Utils.findExecutable();
281-
assertNotNull(executable);
282276

283277
FilenameFilter filter = (dir, name) -> name.startsWith("org.eclipse.equinox.executable");
284278
File[] files = new File(executable, "features").listFiles(filter);
@@ -361,7 +355,6 @@ public void testBug252246() throws Exception {
361355
IFolder buildFolder = newTest("252246");
362356

363357
File executable = Utils.findExecutable();
364-
assertNotNull(executable);
365358

366359
IFile product = buildFolder.getFile("foo.product");
367360
Utils.generateProduct(product, null, "1.0.0", null, new String[] { "A",
@@ -618,7 +611,6 @@ public void testBug269540() throws Exception {
618611
IFolder buildFolder = newTest("269540");
619612

620613
File executable = Utils.findExecutable();
621-
assertNotNull(executable);
622614

623615
IFolder a = Utils.createFolder(buildFolder, "plugins/A");
624616
Utils.generateBundle(a, "A");

build/org.eclipse.pde.build.tests/src/org/eclipse/pde/build/internal/tests/Utils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*******************************************************************************/
1414
package org.eclipse.pde.build.internal.tests;
1515

16-
import static org.junit.Assume.assumeTrue;
16+
import static org.junit.Assert.assertNotNull;
1717

1818
import java.io.BufferedInputStream;
1919
import java.io.BufferedOutputStream;
@@ -393,8 +393,8 @@ public static File findExecutable() throws IOException {
393393
}
394394
File fallback = new File(baseLocation.getParent(), "deltapack/eclipse");
395395
executableLocation = findExecutable(fallback);
396-
assumeTrue("All attempts to find the executable failed including fallback to " + fallback.getAbsolutePath(),
397-
executableLocation != null);
396+
assertNotNull("All attempts to find the executable failed including fallback to " + fallback.getAbsolutePath(),
397+
executableLocation);
398398
return executableLocation;
399399
}
400400

build/org.eclipse.pde.build.tests/src/org/eclipse/pde/build/internal/tests/p2/P2Tests.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public void offP2SimpleProduct() throws Exception {
5959
IFolder repo = Utils.createFolder(buildFolder, "repo");
6060

6161
File executable = Utils.findExecutable();
62-
assertNotNull(executable);
6362

6463
String os = Platform.getOS();
6564
String ws = Platform.getWS();
@@ -215,7 +214,6 @@ public void testBug242346() throws Exception {
215214
false);
216215

217216
File executable = Utils.findExecutable();
218-
assertNotNull(executable);
219217

220218
Properties properties = BuildConfiguration.getBuilderProperties(buildFolder);
221219
String repoLocation = "file:" + repo.getLocation().toOSString();
@@ -333,7 +331,6 @@ public void offBug237662() throws Exception {
333331
IFile productFile = buildFolder.getFile("rcp.product");
334332

335333
File executable = Utils.findExecutable();
336-
assertNotNull(executable);
337334

338335
Utils.generateProduct(productFile, "rcp.product", "1.0.0",
339336
new String[] { OSGI, CORE_RUNTIME, SIMPLE_CONFIGURATOR, EQUINOX_PREFERENCES }, false);
@@ -412,7 +409,6 @@ public void testBug258126() throws Exception {
412409
IFolder buildFolder = newTest("258126");
413410

414411
File executable = Utils.findExecutable();
415-
assertNotNull(executable);
416412

417413
IFolder repo = Utils.createFolder(buildFolder, "repo");
418414

@@ -634,8 +630,7 @@ public void testBug263272() throws Exception {
634630
IFolder b = Utils.createFolder(buildFolder, "plugins/b");
635631
IFolder c = Utils.createFolder(buildFolder, "plugins/c");
636632

637-
Utils.generateFeature(buildFolder, "F", null, new String[] { "a", "b;os=linux",
638-
"b;os=win32", "c" });
633+
Utils.generateFeature(buildFolder, "F", null, new String[] { "a", "b;os=linux", "b;os=win32", "c" });
639634
Properties featureProperties = new Properties();
640635
featureProperties.put("bin.includes", "feature.xml");
641636
Utils.storeProperties(buildFolder.getFile("features/F/build.properties"), featureProperties);
@@ -689,8 +684,7 @@ public void testBug263272() throws Exception {
689684
runBuild(buildFolder);
690685

691686
// now change A and recompile
692-
Utils.generateFeature(buildFolder, "F", null,
693-
new String[] { "a", "b;os=linux;optional=true", "c" });
687+
Utils.generateFeature(buildFolder, "F", null, new String[] { "a", "b;os=linux;optional=true", "c" });
694688
Utils.storeProperties(buildFolder.getFile("features/F/build.properties"), featureProperties);
695689

696690
code = new StringBuffer();
@@ -891,7 +885,6 @@ public void testBug263272_2() throws Exception {
891885
public void testBug267461() throws Exception {
892886
IFolder buildFolder = newTest("267461");
893887
File executable = Utils.findExecutable();
894-
assertNotNull(executable);
895888

896889
IFile productFile = buildFolder.getFile("rcp.product");
897890
IFolder repo = Utils.createFolder(buildFolder, "repo");

build/org.eclipse.pde.build.tests/src/org/eclipse/pde/build/internal/tests/p2/PublishingTests.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,6 @@ public void testPublishFeature_ExecutableFeature() throws Exception {
482482

483483
IFolder buildFolder = newTest("PublishFeature_Executable");
484484
File executableLocation = Utils.findExecutable();
485-
assertNotNull(executableLocation);
486485

487486
File originalExecutable = findExecutableFeature(executableLocation);
488487

@@ -681,7 +680,6 @@ public void testPublish_Brand_1() throws Exception {
681680
IFolder rcp = Utils.createFolder(buildFolder, "rcp");
682681

683682
File executableLocation = Utils.findExecutable();
684-
assertNotNull(executableLocation);
685683

686684
File executable = findExecutableFeature(executableLocation);
687685
String executableVersion = executable.getName().substring(executable.getName().indexOf('_') + 1);
@@ -858,7 +856,6 @@ public void testPublishAndRunSimpleProduct() throws Exception {
858856
IFolder buildFolder = newTest("PublishAndRunSimpleProduct");
859857

860858
File executable = Utils.findExecutable();
861-
assertNotNull(executable);
862859

863860
// headless rcp hello world
864861
IFolder headless = Utils.createFolder(buildFolder, "plugins/headless");
@@ -1206,7 +1203,6 @@ public void testShape_267506() throws Exception {
12061203
public void testBug267461_2() throws Exception {
12071204
IFolder buildFolder = newTest("267461_2");
12081205
File executable = Utils.findExecutable();
1209-
assertNotNull(executable);
12101206

12111207
IFile productFile = buildFolder.getFile("rcp.product");
12121208
Utils.generateProduct(productFile, "uid.product", "rcp.product", "1.0.0.qualifier", "my.app", null,
@@ -1253,7 +1249,6 @@ public void testBug267461_2() throws Exception {
12531249
public void testBug267972() throws Exception {
12541250
IFolder buildFolder = newTest("267972");
12551251
File executable = Utils.findExecutable();
1256-
assertNotNull(executable);
12571252

12581253
IFile productFile = buildFolder.getFile("rcp.product");
12591254
Utils.generateProduct(productFile, "rcp.product", "1.0.0.qualifier", new String[] { OSGI, EQUINOX_COMMON,
@@ -1573,7 +1568,6 @@ public void testPublish_FeatureBasedProduct() throws Exception {
15731568
IFolder finalRepo = Utils.createFolder(buildFolder, "final");
15741569

15751570
File executable = Utils.findExecutable();
1576-
assertNotNull(executable);
15771571

15781572
Utils.generateFeature(buildFolder, "f", null, new String[] { OSGI, EQUINOX_COMMON });
15791573
Utils.writeBuffer(buildFolder.getFile("features/f/important.txt"), new StringBuffer("boo-urns"));
@@ -1640,7 +1634,6 @@ public void testPublish_FeatureBasedProduct() throws Exception {
16401634
public void testDirectorLogging() throws Exception {
16411635
IFolder buildFolder = newTest("directorLogging");
16421636
File executable = Utils.findExecutable();
1643-
assertNotNull(executable);
16441637

16451638
IFile productFile = buildFolder.getFile("rcp.product");
16461639
Utils.generateProduct(productFile, "uid.product", "rcp.product", "1.0.0.qualifier", "my.app", null,
@@ -1738,7 +1731,6 @@ public void testBug268498() throws Exception {
17381731
IFolder rcp = Utils.createFolder(buildFolder, "rcp");
17391732

17401733
File executable = Utils.findExecutable();
1741-
assertNotNull(executable);
17421734

17431735
IFile product = rcp.getFile("rcp.product");
17441736
StringBuffer extra = new StringBuffer();
@@ -1824,8 +1816,7 @@ public void testPublish_P2InfConfigProperty() throws Exception {
18241816
IFolder buildFolder = newTest("infConfig");
18251817
IFolder rcp = Utils.createFolder(buildFolder, "rcp");
18261818

1827-
File executable = Utils.findExecutable();
1828-
assertNotNull(executable);
1819+
Utils.findExecutable();
18291820

18301821
IFile product = rcp.getFile("rcp.product");
18311822
Utils.generateProduct(product, "org.example.rcp", "1.0.0", null, new String[] { OSGI }, false, null);

0 commit comments

Comments
 (0)