Start getting some unit tests to pass

The main requirement here is to arrange for the proper classpath
settings when tests are running so that they can find any associated
resources (i.e., other supporting files).
This commit is contained in:
Ben Liblit 2017-12-26 13:41:27 -06:00
parent 04d9397a1d
commit 01a4fe025e
6 changed files with 16 additions and 5 deletions

View File

@ -2,6 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="tests"/>
<classpathentry kind="src" path="examples-src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin"/>

View File

@ -1,6 +1,9 @@
sourceSets {
main.java.srcDir 'src'
test.java.srcDir 'tests'
test {
java.srcDir 'tests'
resources.srcDir project(':com.ibm.wala.cast.js.test.data').file('examples-src')
}
}
dependencies {

View File

@ -30,6 +30,10 @@ task unversionAjaxslt(type: Sync, dependsOn: unpackAjaxslt) {
into 'examples-src/ajaxslt'
}
task processTestResources(dependsOn: unversionAjaxslt) {
}
clean {
delete unversionAjaxslt
delete downloadAjaxslt
}

View File

@ -16,4 +16,7 @@ dependencies {
testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests')
}
processTestResources.dependsOn tasks.getByPath(':com.ibm.wala.cast.js.test.data:unversionAjaxslt')
processTestResources {
// TODO: figure out why we cannot get at tasks from ':com.ibm.wala.cast.js.test.data'
// dependsOn project(':com.ibm.wala.cast.js.test.data').tasks.processTestResources
}

View File

@ -8,6 +8,8 @@ dependencies {
testCompile 'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214'
testCompile 'org.eclipse.jdt:org.eclipse.jdt.core:3.13.50'
testCompile 'org.eclipse.platform:org.eclipse.core.runtime:3.13.0'
testCompile 'org.eclipse.platform:org.eclipse.osgi:3.12.50'
testCompile 'org.osgi:org.osgi.core:4.2.0'
testCompile project(':com.ibm.wala.cast')
testCompile project(':com.ibm.wala.cast.java')
testCompile project(':com.ibm.wala.cast.java.ecj')
@ -19,5 +21,4 @@ dependencies {
testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.cast.java.test')
testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests')
testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.ide.tests')
testRuntime 'org.eclipse.platform:org.eclipse.osgi:3.12.50'
}

View File

@ -5,9 +5,7 @@ dependencies {
testCompile 'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214'
testCompile 'org.eclipse.platform:org.eclipse.core.runtime:3.13.0'
testCompile 'org.eclipse.platform:org.eclipse.equinox.common:3.9.0'
testCompile 'org.eclipse.platform:org.eclipse.osgi:3.12.50'
testCompile 'org.eclipse.wst.jsdt:core:1.0.201.v2010012803'
testCompile 'org.osgi:org.osgi.core:4.2.0'
testCompile project(':com.ibm.wala.cast')
testCompile project(':com.ibm.wala.cast.js')
testCompile project(':com.ibm.wala.cast.js.rhino')
@ -15,4 +13,5 @@ dependencies {
testCompile project(':com.ibm.wala.ide.jsdt')
testCompile project(':com.ibm.wala.util')
testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.ide.tests')
testRuntime 'org.eclipse.platform:org.eclipse.osgi:3.12.50'
}