# HG changeset patch # User Artem Tikhomirov # Date 1340132813 -7200 # Node ID 55e9588b84b83aa96fe76a06ee8bf067c5d3c90e # Parent c95cd5994ba23a7d52f13d74fea0ac6febd76ec8 Run tests with gradle diff -r c95cd5994ba2 -r 55e9588b84b8 build.gradle --- a/build.gradle Tue Jun 19 21:06:21 2012 +0200 +++ b/build.gradle Tue Jun 19 21:06:53 2012 +0200 @@ -1,6 +1,6 @@ def isRelease = false - version = '0.9.0-SNAPSHOT' + version = '0.9.5-SNAPSHOT' description = 'Pure Java API and Toolkit for Mercurial DVCS' group = 'org.tmatesoft.hg4j' @@ -115,11 +115,43 @@ } } + + task findOutWhyProjectCopyDoesntWork() << { + // files under .hg/ are not copied with copy {} + ext.myjar = zipTree( 'test-data/test-repos.jar' ) + ext.destDir = new File(project.getBuildDir(), "hg4j-tests1/") + outputs.dir ext.destDir + CopySpec ss = copySpec { + from ext.myjar + into ext.destDir + include '*', '*/.*', '**/.*/*', '**/.*', '**/*', '*/.*/**', '**/**', '.*/**', '**/.hg/*', '**/.hg*' + eachFile {element -> + println "AAA:$element.relativePath" + } + } + println "includeEmptyDir: $ss.includeEmptyDirs" + println "includes: $ss.includes" + println "allIncludes: $ss.allIncludes" + println "excludes: $ss.excludes" + println "allExcludes: $ss.allExcludes" + } + + test { // // // - systemProperties 'hg4j.tests.repos' : 'value' + File testReposRoot = new File(project.getBuildDir(), "hg4j-tests2/"); + if ( testReposRoot.exists() ) { + project.delete(testReposRoot) + } + testReposRoot.mkdirs(); + + zipTree('test-data/test-repos.jar').visit {element -> + element.copyTo(element.relativePath.getFile(testReposRoot)) + } + + systemProperties 'hg4j.tests.repos' : testReposRoot systemProperties 'hg4j.tests.remote' : 'http://hg.serpentine.com/tutorial/hello' } \ No newline at end of file