You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by co...@apache.org on 2015/02/20 21:50:29 UTC

bigtop git commit: BIGTOP-1621. Migrate itest to gradle

Repository: bigtop
Updated Branches:
  refs/heads/master 0a66c49e5 -> f5a8a375e


BIGTOP-1621. Migrate itest to gradle


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/f5a8a375
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/f5a8a375
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/f5a8a375

Branch: refs/heads/master
Commit: f5a8a375e1ea62d6fc7f7f7dacb7cb311da574fd
Parents: 0a66c49
Author: Konstantin Boudnik <co...@apache.org>
Authored: Fri Feb 20 12:50:00 2015 -0800
Committer: Konstantin Boudnik <co...@apache.org>
Committed: Fri Feb 20 12:50:00 2015 -0800

----------------------------------------------------------------------
 README.md       |  8 +++++++
 build.gradle    | 63 +++++++++++++++++++++++++++++++++++++++++-----------
 packages.gradle |  2 +-
 settings.gradle |  4 ++++
 4 files changed, 63 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/f5a8a375/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index cdf4c4c..1d8dcda 100644
--- a/README.md
+++ b/README.md
@@ -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

http://git-wip-us.apache.org/repos/asf/bigtop/blob/f5a8a375/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 02ac770..88e84b8 100644
--- a/build.gradle
+++ b/build.gradle
@@ -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 '.'

http://git-wip-us.apache.org/repos/asf/bigtop/blob/f5a8a375/packages.gradle
----------------------------------------------------------------------
diff --git a/packages.gradle b/packages.gradle
index a3a892c..2608f43 100644
--- a/packages.gradle
+++ b/packages.gradle
@@ -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 = [

http://git-wip-us.apache.org/repos/asf/bigtop/blob/f5a8a375/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index a752a5c..30e6924 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -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'