Skip to content
Permalink
Browse files
BIGTOP-1621. Migrate itest to gradle
  • Loading branch information
Konstantin Boudnik committed Feb 20, 2015
1 parent 0a66c49 commit f5a8a375e1ea62d6fc7f7f7dacb7cb311da574fd
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 14 deletions.
@@ -101,6 +101,14 @@ WARNING: since testing packages requires installing them on a live system it is

* Step 2: Run the the smoke tests on your cluster (see Step 3 and/or Step 4 below)

We are on the route of migrating subprojects under top-level gradle build. Currently
converted projects could be listed by running

gradle projects

To see the list of tasks in a subproject, ie itest-common, you can run

gradle itest-common:tasks

* Old Way
* Step 1: Build the smokes with snapshots. This ensures that all transitive dependencies etc.. are in your repo
@@ -15,20 +15,58 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'java'
apply plugin: 'maven'
// All packaging logic is separated into its own build module
apply from: 'packages.gradle'
def final langLevel = "1.7"

group = 'org.apache.bigtop'
version = '0.9.0-SNAPSHOT'
allprojects {
apply plugin: 'java'
apply plugin: 'maven'

description = """Bigtop"""
group = 'org.apache.bigtop'
version = '0.9.0-SNAPSHOT'

def TESTARTIFACTS_GROUP = 'test artifacts'
description = """Bigtop"""

sourceCompatibility = langLevel
targetCompatibility = langLevel

sourceCompatibility = 1.6
targetCompatibility = 1.6
repositories {
maven { url "http://repository.apache.org/snapshots" }
maven { url "http://repo.maven.apache.org/maven2" }
mavenCentral()
}
}

subprojects {
apply plugin: 'groovy'
}

project(':itest-common') {
description = """iTest: system and integration testing in the cloud"""

dependencies {
compile group: 'org.codehaus.groovy', name: 'groovy-all', version:'2.1.8'
compile group: 'junit', name: 'junit', version:'4.11'
compile group: 'commons-logging', name: 'commons-logging', version:'1.1'
compile group: 'org.apache.ant', name: 'ant', version:'1.8.2'
compile group: 'org.apache.ant', name: 'ant-junit', version:'1.8.2'
}

task packageITest(type: Jar) {
from sourceSets.main.output
//classifier = 'tests'
}

artifacts.archives packageITest

test {
exclude '**/Dummy*'
}
}

// All packaging logic is separated into its own build module
apply from: 'packages.gradle'

def TESTARTIFACTS_GROUP = 'test artifacts'

task installTopLevel(type:Exec) {
workingDir "."
@@ -61,13 +99,12 @@ task installAllLocalArtifacts (
*/
def artifactToInstall = {
def final BASE_DIR = projectDir.absolutePath
def final TEST_DIR = "bigtop-tests/test-artifacts"
def final ARTIFACT_DIR = "${BASE_DIR}/${TEST_DIR}"
def final TEST_DIR = "$BASE_DIR/bigtop-tests/test-artifacts"

def project = new XmlSlurper().parse("$TEST_DIR/pom.xml")
project.modules.module.each { artifact ->
task "install-${artifact}" (description: "Installs ${artifact} artifact with Maven", group: TESTARTIFACTS_GROUP) << {
def final PATH = "${ARTIFACT_DIR}/$artifact/pom.xml"
def final PATH = "${TEST_DIR}/$artifact/pom.xml"
def final WRAPPER = "mvn clean install -f " + PATH
exec {
workingDir '.'
@@ -33,7 +33,7 @@ apply plugin: 'download-task'
def PACKAGES_GROUP = 'package'

final String VERBOSE = "verbose"
final String BOM = "bigtop.mk"
final String BOM = "$rootDir/bigtop.mk"

//HashMap <String, String>
def BOM_map = [
@@ -16,3 +16,7 @@
* limitations under the License.
*/
rootProject.name = 'bigtop'

include 'bigtop-test-framework', 'bigtop-tests:smoke-tests'

project(":bigtop-test-framework").name = 'itest-common'

0 comments on commit f5a8a37

Please sign in to comment.