Lines 58-63
Link Here
|
58 |
import java.util.Map; |
58 |
import java.util.Map; |
59 |
import java.util.Set; |
59 |
import java.util.Set; |
60 |
import java.util.TreeMap; |
60 |
import java.util.TreeMap; |
|
|
61 |
import java.util.logging.Logger; |
61 |
import java.util.regex.Matcher; |
62 |
import java.util.regex.Matcher; |
62 |
import java.util.regex.Pattern; |
63 |
import java.util.regex.Pattern; |
63 |
import javax.swing.event.ChangeListener; |
64 |
import javax.swing.event.ChangeListener; |
Lines 77-83
Link Here
|
77 |
import org.openide.ErrorManager; |
78 |
import org.openide.ErrorManager; |
78 |
import org.openide.filesystems.FileObject; |
79 |
import org.openide.filesystems.FileObject; |
79 |
import org.openide.filesystems.FileUtil; |
80 |
import org.openide.filesystems.FileUtil; |
80 |
import org.openide.modules.InstalledFileLocator; |
|
|
81 |
import org.openide.util.ChangeSupport; |
81 |
import org.openide.util.ChangeSupport; |
82 |
import org.openide.util.Mutex; |
82 |
import org.openide.util.Mutex; |
83 |
import org.openide.util.RequestProcessor; |
83 |
import org.openide.util.RequestProcessor; |
Lines 367-378
Link Here
|
367 |
defaults.put("manifest.mf", "manifest.mf"); // NOI18N |
367 |
defaults.put("manifest.mf", "manifest.mf"); // NOI18N |
368 |
defaults.put("src.dir", "src"); // NOI18N |
368 |
defaults.put("src.dir", "src"); // NOI18N |
369 |
defaults.put("build.classes.dir", "build/classes"); // NOI18N |
369 |
defaults.put("build.classes.dir", "build/classes"); // NOI18N |
370 |
defaults.put("test.unit.src.dir", "test/unit/src"); // NOI18N |
|
|
371 |
defaults.put("test.qa-functional.src.dir", "test/qa-functional/src"); // NOI18N |
372 |
defaults.put("test.qa-performance.src.dir", "test/qa-performance/src"); // NOI18N |
373 |
defaults.put("build.test.unit.classes.dir", "build/test/unit/classes"); // NOI18N |
374 |
defaults.put("javac.source", "1.4"); // NOI18N |
370 |
defaults.put("javac.source", "1.4"); // NOI18N |
375 |
defaults.put("test.user.dir", new File(dir, "build/testuserdir").getAbsolutePath()); // NOI18N |
371 |
defaults.put("test.user.dir", new File(dir, "build/testuserdir").getAbsolutePath()); // NOI18N |
|
|
372 |
Set<String> testTypes = new HashSet<String>(Arrays.asList(NbModuleProject.COMMON_TEST_TYPES)); |
373 |
// XXX would be good to add in any other types defined in project.xml |
374 |
for (String testType : testTypes) { |
375 |
defaults.put("test." + testType + ".src.dir", "test/" + testType + "/src"); // NOI18N |
376 |
defaults.put("test." + testType + ".data.dir", "test/" + testType + "/data"); // NOI18N |
377 |
defaults.put("build.test." + testType + ".classes.dir", "build/test/" + testType + "/classes"); // NOI18N |
378 |
} |
376 |
providers.add(PropertyUtils.fixedPropertyProvider(defaults)); |
379 |
providers.add(PropertyUtils.fixedPropertyProvider(defaults)); |
377 |
if (ml != null) { |
380 |
if (ml != null) { |
378 |
providers.add(PropertyUtils.fixedPropertyProvider(Collections.singletonMap("module.classpath", computeModuleClasspath(ml)))); // NOI18N |
381 |
providers.add(PropertyUtils.fixedPropertyProvider(Collections.singletonMap("module.classpath", computeModuleClasspath(ml)))); // NOI18N |
Lines 382-451
Link Here
|
382 |
buildDefaults.put("run.cp", computeRuntimeModuleClasspath(ml) + ":${cp.extra}:${build.classes.dir}"); // NOI18N |
385 |
buildDefaults.put("run.cp", computeRuntimeModuleClasspath(ml) + ":${cp.extra}:${build.classes.dir}"); // NOI18N |
383 |
|
386 |
|
384 |
baseEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[providers.size()])); |
387 |
baseEval = PropertyUtils.sequentialPropertyEvaluator(predefs, providers.toArray(new PropertyProvider[providers.size()])); |
385 |
buildDefaults.put("test.unit.cp.extra", ""); // NOI18N |
388 |
|
386 |
String testJars; // #68685 - follow Ant script |
389 |
Map<String,TestClasspath> testsCPs = computeTestingClassPaths(ml, baseEval, testTypes); |
387 |
if (type == NbModuleProvider.NETBEANS_ORG) { |
390 |
testTypes.addAll(testsCPs.keySet()); |
388 |
// Cf. nbbuild/templates/projectized.xml#test-lib-init |
391 |
for (String testType : testTypes) { |
389 |
buildDefaults.put("xtest.home", "${nb_all}/xtest"); // NOI18N |
392 |
buildDefaults.put("test." + testType + ".cp.extra", ""); // NOI18N |
390 |
testJars = |
393 |
TestClasspath tcp = TestClasspath.getOrEmpty(testsCPs, testType); |
391 |
"${xtest.home}/lib/junit.jar:" + // NOI18N |
394 |
buildDefaults.put("test." + testType + ".cp", "${cp}:${cluster}/${module.jar}:${test." + testType + ".cp.extra}:" + tcp.getCompileClasspath()); // NOI18N |
392 |
"${xtest.home}/lib/nbjunit.jar:" + // NOI18N |
395 |
buildDefaults.put("test." + testType + ".run.cp.extra", ""); // NOI18N |
393 |
"${xtest.home}/lib/nbjunit-ide.jar:" + // NOI18N |
396 |
buildDefaults.put("test." + testType + ".run.cp", "${test." + testType + ".cp}:${build.test." + testType + ".classes.dir}:${test." + testType + ".run.cp.extra}:" + tcp.getRuntimeClasspath()); // NOI18N |
394 |
"${xtest.home}/lib/insanelib.jar"; // NOI18N |
|
|
395 |
} else { |
396 |
// Cf. apisupport/harness/release/build.xml#test-lib-init |
397 |
testJars = |
398 |
"${test.unit.lib.cp}:" + // NOI18N |
399 |
// XXX this is ugly, try to look for the JAR using wildcards instead |
400 |
"${netbeans.dest.dir}/ide6/modules/ext/junit-3.8.1.jar:" + // NOI18N |
401 |
"${netbeans.dest.dir}/java2/modules/ext/junit-3.8.2.jar:" + // NOI18N |
402 |
"${netbeans.dest.dir}/java2/modules/ext/junit-4.1.jar:" + // NOI18N |
403 |
"${netbeans.dest.dir}/testtools/modules/ext/nbjunit.jar:" + // NOI18N |
404 |
"${netbeans.dest.dir}/testtools/modules/ext/insanelib.jar:" + // NOI18N |
405 |
"${netbeans.dest.dir}/testtools/modules/org-netbeans-modules-nbjunit.jar:" + // NOI18N, new for 6.0 |
406 |
"${netbeans.dest.dir}/testtools/modules/org-netbeans-modules-nbjunit-ide.jar:" + // NOI18N, new for 6.0 |
407 |
"${netbeans.home}/../ide6/modules/ext/junit-3.8.1.jar:" + // NOI18N |
408 |
"${netbeans.home}/../java2/modules/ext/junit-3.8.2.jar:" + // NOI18N |
409 |
"${netbeans.home}/../java2/modules/ext/junit-4.1.jar:" + // NOI18N |
410 |
"${netbeans.home}/../testtools/modules/ext/nbjunit.jar:" + // NOI18N |
411 |
"${netbeans.home}/../testtools/modules/ext/insanelib.jar:" + // NOI18N |
412 |
"${netbeans.home}/../testtools/modules/org-netbeans-modules-nbjunit.jar:" + // NOI18N, new for 6.0 |
413 |
"${netbeans.home}/../testtools/modules/org-netbeans-modules-nbjunit-ide.jar:" + // NOI18N, new for 6.0 |
414 |
"${netbeans.user}/modules/ext/nbjunit.jar:" + // NOI18N |
415 |
"${netbeans.user}/modules/ext/insanelib.jar:" + // NOI18N |
416 |
"${netbeans.dest.dir}/../../xtest/lib/junit.jar:" + // NOI18N |
417 |
"${netbeans.dest.dir}/../../xtest/lib/nbjunit.jar:" + // NOI18N |
418 |
"${netbeans.dest.dir}/../../xtest/lib/insanelib.jar:" + // NOI18N |
419 |
"${netbeans.user}/modules/org-netbeans-modules-nbjunit.jar:" + // NOI18N, new for 6.0 |
420 |
"${netbeans.user}/modules/org-netbeans-modules-nbjunit-ide.jar"; // NOI18N, new for 6.0 |
421 |
} |
397 |
} |
422 |
Map<String,TestClasspath> testsCPs = computeTestingClassPaths(ml,baseEval); |
398 |
|
423 |
TestClasspath tcp = TestClasspath.getOrEmpty(testsCPs, "unit"); // NOI18N |
|
|
424 |
|
425 |
buildDefaults.put("test.unit.cp", "${cp}:${cluster}/${module.jar}:" + testJars + ":${test.unit.cp.extra}:" + tcp.getCompileClasspath()); // NOI18N |
426 |
buildDefaults.put("test.unit.run.cp.extra", ""); // NOI18N |
427 |
buildDefaults.put("test.unit.run.cp", "${test.unit.cp}:${build.test.unit.classes.dir}:${test.unit.run.cp.extra}:"+ tcp.getRuntimeClasspath()); // NOI18N |
428 |
// #61085: need to treat qa-functional tests the same way... |
429 |
buildDefaults.put("test.qa-functional.cp.extra", ""); // NOI18N |
430 |
// No idea how XTest finds these, some weird magic, so no Ant script to match up to: |
431 |
String jemmyJar = findJemmyJar(baseEval); |
432 |
if (jemmyJar != null) { |
433 |
buildDefaults.put("jemmy.jar", jemmyJar); // NOI18N |
434 |
} |
435 |
String jelly2NbJar = findJelly2NbJar(baseEval); |
436 |
if (jelly2NbJar != null) { |
437 |
buildDefaults.put("jelly2-nb.jar", jelly2NbJar); // NOI18N |
438 |
} |
439 |
tcp = TestClasspath.getOrEmpty(testsCPs, "qa-functional"); // NOI18N |
440 |
buildDefaults.put("test.qa-functional.cp", testJars + // NOI18N |
441 |
":${netbeans.home}/../testtools/modules/ext/nbjunit-ide.jar" + // NOI18N |
442 |
":${netbeans.user}/testtools/modules/ext/nbjunit.jar" + // NOI18N |
443 |
":${jemmy.jar}" + // NOI18N |
444 |
":${jelly2-nb.jar}" + // NOI18N |
445 |
":${test.qa-functional.cp.extra}:" + // NOI18N |
446 |
tcp.compile + ':' + tcp.testCompile); |
447 |
buildDefaults.put("build.test.qa-functional.classes.dir", "build/test/qa-functional/classes"); // NOI18N |
448 |
buildDefaults.put("test.qa-functional.run.cp", "${test.qa-functional.cp}:${build.test.qa-functional.classes.dir}" + ':' + tcp.runtime + ':' + tcp.testRuntime); // NOI18N |
449 |
providers.add(PropertyUtils.fixedPropertyProvider(buildDefaults)); |
399 |
providers.add(PropertyUtils.fixedPropertyProvider(buildDefaults)); |
450 |
} |
400 |
} |
451 |
// skip a bunch of properties irrelevant here - NBM stuff, etc. |
401 |
// skip a bunch of properties irrelevant here - NBM stuff, etc. |
Lines 572-611
Link Here
|
572 |
} |
522 |
} |
573 |
|
523 |
|
574 |
/** |
524 |
/** |
575 |
* Get an Ant location for the root of jemmy.jar. |
|
|
576 |
*/ |
577 |
private String findJemmyJar(PropertyEvaluator eval) { |
578 |
File f = project.getNbrootFile("jemmy/builds/jemmy.jar", eval); // NOI18N |
579 |
if(f == null) { |
580 |
// try to find jemmy.jar installed by Jemmy module |
581 |
f = InstalledFileLocator.getDefault().locate( |
582 |
"modules/ext/jemmy.jar", "org.netbeans.modules.jemmy", false); // NOI18N |
583 |
} |
584 |
if (f != null) { |
585 |
return f.getAbsolutePath(); |
586 |
} else { |
587 |
return null; |
588 |
} |
589 |
} |
590 |
|
591 |
/** |
592 |
* Get an Ant location for the root of jemmy.jar. |
593 |
*/ |
594 |
private String findJelly2NbJar(PropertyEvaluator eval) { |
595 |
File f = project.getNbrootFile("jellytools/builds/jelly2-nb.jar", eval); // NOI18N |
596 |
if(f == null) { |
597 |
// try to find jelly2-nb.jar installed by Jellytools module |
598 |
f = InstalledFileLocator.getDefault().locate( |
599 |
"modules/ext/jelly2-nb.jar", "org.netbeans.modules.jellytools", false); // NOI18N |
600 |
} |
601 |
if (f != null) { |
602 |
return f.getAbsolutePath(); |
603 |
} else { |
604 |
return null; |
605 |
} |
606 |
} |
607 |
|
608 |
/** |
609 |
* Should be similar to impl in ParseProjectXml. |
525 |
* Should be similar to impl in ParseProjectXml. |
610 |
*/ |
526 |
*/ |
611 |
private String computeModuleClasspath(ModuleList ml) { |
527 |
private String computeModuleClasspath(ModuleList ml) { |
Lines 686-695
Link Here
|
686 |
* to the {@link TestClasspath test classpath} according to the content in |
602 |
* to the {@link TestClasspath test classpath} according to the content in |
687 |
* the project's metadata (<em>project.xml<em>). |
603 |
* the project's metadata (<em>project.xml<em>). |
688 |
*/ |
604 |
*/ |
689 |
private Map<String,TestClasspath> computeTestingClassPaths(ModuleList ml, PropertyEvaluator evaluator) { |
605 |
private Map<String,TestClasspath> computeTestingClassPaths(ModuleList ml, PropertyEvaluator evaluator, Set<String> extraTestTypes) { |
690 |
Map<String, TestClasspath> classpaths = new HashMap<String,TestClasspath>(); |
606 |
Map<String, TestClasspath> classpaths = new HashMap<String,TestClasspath>(); |
691 |
ProjectXMLManager pxm = new ProjectXMLManager(project); |
607 |
ProjectXMLManager pxm = new ProjectXMLManager(project); |
692 |
Map<String, Set<TestModuleDependency>> testTypes = pxm.getTestDependencies(ml); |
608 |
Map<String, Set<TestModuleDependency>> testDependencies = pxm.getTestDependencies(ml); |
693 |
|
609 |
|
694 |
String testDistDir = evaluator.getProperty("test.dist.dir"); // NOI18N |
610 |
String testDistDir = evaluator.getProperty("test.dist.dir"); // NOI18N |
695 |
if (testDistDir == null) { |
611 |
if (testDistDir == null) { |
Lines 709-750
Link Here
|
709 |
testDistDir = moduleDir + File.separatorChar + "build" + File.separatorChar + "testdist"; // NOI18N |
625 |
testDistDir = moduleDir + File.separatorChar + "build" + File.separatorChar + "testdist"; // NOI18N |
710 |
} |
626 |
} |
711 |
} |
627 |
} |
712 |
for (Map.Entry<String,Set<TestModuleDependency>> entry : testTypes.entrySet()) { |
628 |
for (Map.Entry<String,Set<TestModuleDependency>> entry : testDependencies.entrySet()) { |
713 |
computeTestType(entry.getKey(), new File(testDistDir), entry.getValue(), classpaths, ml); |
629 |
computeTestType(entry.getKey(), new File(testDistDir), entry.getValue(), classpaths, ml); |
|
|
630 |
} |
631 |
for (String testType : extraTestTypes) { |
632 |
if (!testDependencies.containsKey(testType)) { |
633 |
// No declared dependencies of this type, so will definitely need to add in compatibility libraries. |
634 |
computeTestType(testType, new File(testDistDir), Collections.<TestModuleDependency>emptySet(), classpaths, ml); |
635 |
} |
714 |
} |
636 |
} |
715 |
return classpaths; |
637 |
return classpaths; |
716 |
} |
638 |
} |
717 |
|
639 |
|
718 |
private void computeTestType(String ttName, File testDistDir, Set<TestModuleDependency> ttModules, Map<String,TestClasspath> classpaths, ModuleList ml) { |
640 |
private void computeTestType(String ttName, File testDistDir, Set<TestModuleDependency> ttModules, Map<String,TestClasspath> classpaths, ModuleList ml) { |
719 |
|
641 |
Set<String> compileCnbs = new HashSet<String>(); |
720 |
Set<String> compileCnds = new HashSet<String>(); |
642 |
Set<String> runtimeCnbs = new HashSet<String>(); |
721 |
Set<String> runtimeCnds = new HashSet<String>(); |
643 |
Set<String> testCompileCnbs = new HashSet<String>(); |
722 |
Set<String> testCompileCnds = new HashSet<String>(); |
644 |
Set<String> testRuntimeCnbs = new HashSet<String>(); |
723 |
Set<String> testRuntimeCnds = new HashSet<String>(); |
|
|
724 |
|
645 |
|
725 |
Set<String> processedRecursive = new HashSet<String>(); |
646 |
Set<String> processedRecursive = new HashSet<String>(); |
|
|
647 |
boolean fullySpecified = false; |
726 |
for (TestModuleDependency td : ttModules) { |
648 |
for (TestModuleDependency td : ttModules) { |
727 |
String cnd = td.getModule().getCodeNameBase(); |
649 |
String cnb = td.getModule().getCodeNameBase(); |
|
|
650 |
fullySpecified |= cnb.equals("org.netbeans.libs.junit4"); |
728 |
if (td.isTest()) { |
651 |
if (td.isTest()) { |
729 |
if (td.isCompile()) { |
652 |
if (td.isCompile()) { |
730 |
testCompileCnds.add(cnd); |
653 |
testCompileCnbs.add(cnb); |
731 |
} |
654 |
} |
732 |
testRuntimeCnds.add(cnd); |
655 |
testRuntimeCnbs.add(cnb); |
733 |
} |
656 |
} |
734 |
if (td.isRecursive()) { |
657 |
if (td.isRecursive()) { |
735 |
// scan cp recursively |
658 |
// scan cp recursively |
736 |
processTestEntryRecursive(td,compileCnds,runtimeCnds,processedRecursive,ml); |
659 |
processTestEntryRecursive(td,compileCnbs,runtimeCnbs,processedRecursive,ml); |
737 |
} else { |
660 |
} else { |
738 |
runtimeCnds.add(cnd); |
661 |
runtimeCnbs.add(cnb); |
739 |
if (td.isCompile()) { |
662 |
if (td.isCompile()) { |
740 |
compileCnds.add(cnd); |
663 |
compileCnbs.add(cnb); |
741 |
} |
664 |
} |
742 |
} |
665 |
} |
743 |
} |
666 |
} |
744 |
TestClasspath testClasspath = new TestClasspath(mergePaths(compileCnds,false,ttName,testDistDir, ml), |
667 |
|
745 |
mergePaths(runtimeCnds,false,ttName,testDistDir,ml), |
668 |
StringBuilder extra = new StringBuilder(); |
746 |
mergePaths(testCompileCnds,true,ttName,testDistDir,ml), |
669 |
if (!fullySpecified) { |
747 |
mergePaths(testRuntimeCnds,true,ttName,testDistDir,ml)); |
670 |
// Old module which failed to specify all its test dependencies. |
|
|
671 |
if (ml.getEntry("org.netbeans.libs.junit4") == null) { |
672 |
// Old platform. For compatibility, compute a basic unit test lib classpath. |
673 |
String[] testLibJars = { |
674 |
"${nb_all}/xtest/lib/insanelib.jar", // NOI18N |
675 |
"${nb_all}/xtest/lib/junit.jar", // NOI18N |
676 |
"${nb_all}/xtest/lib/nbjunit-ide.jar", // NOI18N |
677 |
"${nb_all}/xtest/lib/nbjunit.jar", // NOI18N |
678 |
"${netbeans.dest.dir}/../../xtest/lib/insanelib.jar", // NOI18N |
679 |
"${netbeans.dest.dir}/../../xtest/lib/junit.jar", // NOI18N |
680 |
"${netbeans.dest.dir}/../../xtest/lib/nbjunit.jar", // NOI18N |
681 |
"${netbeans.dest.dir}/ide6/modules/ext/junit-3.8.1.jar", // NOI18N |
682 |
"${netbeans.dest.dir}/java2/modules/ext/junit-3.8.2.jar", // NOI18N |
683 |
"${netbeans.dest.dir}/java2/modules/ext/junit-4.1.jar", // NOI18N |
684 |
"${netbeans.dest.dir}/testtools/modules/ext/insanelib.jar", // NOI18N |
685 |
"${netbeans.dest.dir}/testtools/modules/ext/nbjunit.jar", // NOI18N |
686 |
"${netbeans.dest.dir}/testtools/modules/org-netbeans-modules-nbjunit-ide.jar", // NOI18N |
687 |
"${netbeans.dest.dir}/testtools/modules/org-netbeans-modules-nbjunit.jar", // NOI18N |
688 |
"${netbeans.home}/../ide6/modules/ext/junit-3.8.1.jar", // NOI18N |
689 |
"${netbeans.home}/../java2/modules/ext/junit-3.8.2.jar", // NOI18N |
690 |
"${netbeans.home}/../java2/modules/ext/junit-4.1.jar", // NOI18N |
691 |
"${netbeans.home}/../testtools/modules/ext/insanelib.jar", // NOI18N |
692 |
"${netbeans.home}/../testtools/modules/ext/nbjunit.jar", // NOI18N |
693 |
"${netbeans.home}/../testtools/modules/org-netbeans-modules-nbjunit-ide.jar", // NOI18N |
694 |
"${netbeans.home}/../testtools/modules/org-netbeans-modules-nbjunit.jar", // NOI18N |
695 |
"${netbeans.user}/modules/ext/insanelib.jar", // NOI18N |
696 |
"${netbeans.user}/modules/ext/nbjunit.jar", // NOI18N |
697 |
"${netbeans.user}/modules/org-netbeans-modules-nbjunit-ide.jar", // NOI18N |
698 |
"${netbeans.user}/modules/org-netbeans-modules-nbjunit.jar", // NOI18N |
699 |
}; |
700 |
for (String jar : testLibJars) { |
701 |
extra.append(":"); |
702 |
extra.append(jar); |
703 |
} |
704 |
if (ttName.startsWith("qa-")) { |
705 |
extra.append(":${nb_all}/jemmy/builds/jemmy.jar:${nb_all}/jellytools/builds/jelly2-nb.jar"); |
706 |
} |
707 |
} else { |
708 |
// Basic dependencies many tests use: |
709 |
for (String library : new String[] {"org.netbeans.libs.junit4", "org.netbeans.modules.nbjunit", "org.netbeans.insane"}) { |
710 |
compileCnbs.add(library); |
711 |
runtimeCnbs.add(library); |
712 |
} |
713 |
if (ttName.startsWith("qa-")) { |
714 |
// ProjectSupport moved from the old nbjunit.ide: |
715 |
testCompileCnbs.add("org.netbeans.modules.java.j2seproject"); |
716 |
testRuntimeCnbs.add("org.netbeans.modules.java.j2seproject"); |
717 |
// Common GUI testing tools: |
718 |
for (String library : new String[] {"org.netbeans.modules.jemmy", "org.netbeans.modules.jellytools"}) { |
719 |
compileCnbs.add(library); |
720 |
runtimeCnbs.add(library); |
721 |
} |
722 |
} |
723 |
} |
724 |
} |
725 |
|
726 |
TestClasspath testClasspath = new TestClasspath( |
727 |
mergePaths(compileCnbs,false,ttName,testDistDir, ml) + extra, |
728 |
mergePaths(runtimeCnbs,false,ttName,testDistDir,ml) + extra, |
729 |
mergePaths(testCompileCnbs,true,ttName,testDistDir,ml), |
730 |
mergePaths(testRuntimeCnbs,true,ttName,testDistDir,ml)); |
748 |
|
731 |
|
749 |
classpaths.put(ttName,testClasspath); |
732 |
classpaths.put(ttName,testClasspath); |
750 |
} |
733 |
} |
Lines 779-788
Link Here
|
779 |
} |
762 |
} |
780 |
} |
763 |
} |
781 |
|
764 |
|
|
|
765 |
private static final Set<String> warnedModules = Collections.synchronizedSet(new HashSet<String>()); |
782 |
private String mergePaths(Set<String> cnbs, boolean test,String testtype,File testDistDir,ModuleList ml) { |
766 |
private String mergePaths(Set<String> cnbs, boolean test,String testtype,File testDistDir,ModuleList ml) { |
783 |
StringBuffer cps = new StringBuffer(); |
767 |
StringBuffer cps = new StringBuffer(); |
784 |
for (String cnb : cnbs) { |
768 |
for (String cnb : cnbs) { |
785 |
ModuleEntry module = ml.getEntry(cnb); |
769 |
ModuleEntry module = ml.getEntry(cnb); |
|
|
770 |
if (module == null) { |
771 |
if (warnedModules.add(cnb)) { |
772 |
Logger.getLogger(Evaluator.class.getName()).warning("Cannot find test module dependency: " + cnb); |
773 |
} |
774 |
continue; |
775 |
} |
786 |
if (cps.length() > 0) { |
776 |
if (cps.length() > 0) { |
787 |
cps.append(':'); |
777 |
cps.append(':'); |
788 |
} |
778 |
} |
Lines 795-804
Link Here
|
795 |
File jarFile = new File( |
785 |
File jarFile = new File( |
796 |
testDistDir, testtype + s + clusterName + s + cnb.replace('.','-') + s + "tests.jar"); // NOI18N |
786 |
testDistDir, testtype + s + clusterName + s + cnb.replace('.','-') + s + "tests.jar"); // NOI18N |
797 |
cps.append(jarFile.getPath()); |
787 |
cps.append(jarFile.getPath()); |
|
|
788 |
// See ParseProjectXml: |
789 |
if (!testtype.equals("unit")) { |
790 |
cps.append(':'); |
791 |
jarFile = new File(testDistDir, "unit" + s + clusterName + s + cnb.replace('.', '-') + s + "tests.jar"); // NOI18N |
792 |
cps.append(jarFile.getPath()); |
793 |
} |
798 |
} |
794 |
} |
799 |
|
795 |
|
800 |
} else { |
796 |
} else { |
801 |
cps.append(module.getJarLocation().getPath()); |
797 |
cps.append(module.getJarLocation().getPath()); |
|
|
798 |
cps.append(module.getClassPathExtensions()); // #105621 |
802 |
} |
799 |
} |
803 |
} |
800 |
} |
804 |
return cps.toString(); |
801 |
return cps.toString(); |