From 78986a6befc112541e3f4d89f9b7cacf36fde458 Mon Sep 17 00:00:00 2001 From: Dierk Koenig Date: Tue, 29 Dec 2015 16:11:21 +0100 Subject: releasing version 0.6 --- build.gradle | 8 ++++---- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index a3114ee..2a24a47 100644 --- a/build.gradle +++ b/build.gradle @@ -12,13 +12,13 @@ targetCompatibility = 1.7 ext { baseVersion = "0.6" - isSnapshot = true + isSnapshot = false snapshotAppendix = "-SNAPSHOT" projectVersion = baseVersion + (isSnapshot ? snapshotAppendix : "") projectGroup = "org.frege-lang" - fregeBaseVersion = "3.23.288" - fregeClassifier = "-gaa3af0c" + fregeBaseVersion = "3.23.401" + fregeClassifier = "-g7c45277" fregeVersion = "$fregeBaseVersion$fregeClassifier" // work around https://issues.gradle.org/browse/GRADLE-3281 @@ -58,7 +58,7 @@ repositories { dependencies { compile "$projectGroup:frege:$fregeVersion" - compile "$projectGroup:frege-repl-core:1.2" + compile "$projectGroup:frege-repl-core:1.3" compile "$projectGroup:frege-native-gen:1.3" compile "org.functionaljava:functionaljava:4.4" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2aae013..a7b2d39 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Nov 18 11:44:20 WET 2015 +#Mon Nov 23 11:39:50 CET 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-all.zip -- cgit From bf17722a8c08da3802a346f13584474659fdc76b Mon Sep 17 00:00:00 2001 From: Dierk Koenig Date: Tue, 29 Dec 2015 16:13:37 +0100 Subject: starting 0.7 release train --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 2a24a47..400632e 100644 --- a/build.gradle +++ b/build.gradle @@ -11,8 +11,8 @@ sourceCompatibility = 1.7 targetCompatibility = 1.7 ext { - baseVersion = "0.6" - isSnapshot = false + baseVersion = "0.7" + isSnapshot = true snapshotAppendix = "-SNAPSHOT" projectVersion = baseVersion + (isSnapshot ? snapshotAppendix : "") projectGroup = "org.frege-lang" -- cgit From b13eca1de3f99592229a56a26a5e92c48ceeeffe Mon Sep 17 00:00:00 2001 From: Dierk Koenig Date: Sat, 16 Jan 2016 17:06:24 +0100 Subject: complete the quickcheck options --- README.adoc | 24 +++++- .../frege/gradle/tasks/FregeQuickCheck.groovy | 88 ++++++++++------------ 2 files changed, 62 insertions(+), 50 deletions(-) diff --git a/README.adoc b/README.adoc index 5b8f415..c943b48 100644 --- a/README.adoc +++ b/README.adoc @@ -26,8 +26,10 @@ apply plugin: "org.frege-lang" To apply the plugin using the new incubating, plugin mechanism (since Gradle 2.1), add: ``` plugins { - id "org.frege-lang" version "0.5" + id "org.frege-lang" version "0.7" } + +apply plugin: "org.frege-lang" ``` == Tasks @@ -49,7 +51,25 @@ The plugin adds dependencies so that using the `build` task is typically all tha == Task Help -TODO: Add options and descriptions for each task above. +=== Configuring QuickCheck + +Without any configuration, the `fregeQuickCheck` task (which is triggered as part of the `test` task) +automatically executes all tests from the Frege test source set (default: `src/test/frege`). +It will pick up all functions as tests that return a value of type `Property`. This is usually achieved by +using the factory methods `property` or `once`. +Please see more details under http://www.frege-lang.org/doc/frege/test/QuickCheck.html[QuickCheck API doc]. + +NOTE: Testing fails if no test is found. If your project does not contain any tests, you have to skip testing via `-x test`. + +You can configure the task in many ways. To see all options, you best ask the help: +``` +fregeQuickCheck { + help = true +} +``` + + +TODO: Add options and descriptions for more tasks from above. == Example diff --git a/src/main/groovy/frege/gradle/tasks/FregeQuickCheck.groovy b/src/main/groovy/frege/gradle/tasks/FregeQuickCheck.groovy index e06236f..cb7d5ef 100644 --- a/src/main/groovy/frege/gradle/tasks/FregeQuickCheck.groovy +++ b/src/main/groovy/frege/gradle/tasks/FregeQuickCheck.groovy @@ -7,42 +7,6 @@ import org.gradle.process.internal.JavaExecAction class FregeQuickCheck extends DefaultTask { - // more options to consider: -/* - Looks up quick check predicates in the given modules and tests them. - - [Usage:] java -cp fregec.jar frege.tools.Quick [ option ... ] modulespec ... - - Options: - - - -v print a line for each pedicate that passed - - -n num run _num_ tests per predicate, default is 100 - - -p pred1,pred2,... only test the given predicates - - -x pred1,pred2,... do not test the given predicates - - -l just print the names of the predicates available. - - Ways to specify modules: - - - module the module name (e.g. my.great.Module), will be lookup up in - the current class path. - - dir/ A directory path. The directory is searched for class files, - and for each class files an attempt is made to load it as if - the given directory was in the class path. The directory must - be the root of the classes contained therein, otherwise the - classes won't get loaded. - - path-to.jar A jar or zip file is searched for class files, and for each - class file found an attempt is made to load it as if the - jar was in the class path. - - The number of passed/failed tests is reported. If any test failed or other - errors occured, the exit code will be non zero. - - The code will try to heat up your CPU by running tests on all available cores. - This should be faster on multi-core computers than running the tests - sequentially. It makes it feasable to run more tests per predicate. - - */ - Boolean verbose = true Boolean listAvailable = false Boolean help = false @@ -50,10 +14,9 @@ class FregeQuickCheck extends DefaultTask { List includePredicates List excludePredicates String moduleName - String moduleDirectory String moduleJar - List classpathDirectories = ["$project.buildDir/classes/main", "$project.buildDir/classes/test"] String moduleDir = "$project.buildDir/classes/test" + List classpathDirectories = ["$project.buildDir/classes/main", "$project.buildDir/classes/test"] List allJvmArgs = [] @TaskAction @@ -70,21 +33,50 @@ class FregeQuickCheck extends DefaultTask { def f = project.files(classpathDirectories.collect { s -> new File(s) }) action.setClasspath(project.files(project.configurations.compile).plus(project.files(project.configurations.testRuntime)).plus(f)) - - project.configurations.testRuntime.each { println it } + def moduleSpec = moduleName ?: moduleJar ?: moduleDir def args = [] if (help) { + println """ +FregeQuickCheck Help +-------------------- +All attributes are optional, +currently used moduleDir is '$moduleDir', +currently used moduleSpec is '$moduleSpec'. + +Example attribute values: +fregeQuickCheck { + help = true // default: false + listAvailable = true // default: false, will only list and not execute + verbose = false // default: true, needed to see the results + num = 500 // default: 100 + includePredicates = ['myFirstPred', 'mySecondPred'] + excludePredicates = ['myFirstPred', 'mySecondPred'] + moduleName = 'my.cool.Module' // prio 1 + moduleJar = 'path/to/my/module.jar' // prio 2 + moduleDir = "\$project.buildDir/classes/test" // prio 3, default + classpathDirectories = ["\$project.buildDir/classes/main", "\$project.buildDir/classes/test"] + allJvmArgs = ['-Xss4M'] +} +""" + println "Current Test Runtime is: " + project.configurations.testRuntime.each { println it } + } + + if (verbose) args << "-v" + if (listAvailable) args << "-l" + if (num) args << "-n" << num + if (includePredicates) args << "-p" << includePredicates.join(',') + if (excludePredicates) args << "-x" << excludePredicates.join(',') + if (!allJvmArgs.isEmpty()) { + action.setJvmArgs(allJvmArgs) + } + args << moduleSpec - } else { - if (verbose) args << "-v" - if (listAvailable) args << "-l" - if (!allJvmArgs.isEmpty()) { - action.setJvmArgs(allJvmArgs) - } - args = args + [moduleDir] + if (help) { + println "Calling Frege QuickCheck with args: '${args.join(' ')}'" + println "and JVM args: '${allJvmArgs.join(' ')}'" } - logger.info("Calling Frege QuickCheck with args: '$args'") action.args args action.execute() } -- cgit From 228375a6a6e09c98610967296787af71fb1e7123 Mon Sep 17 00:00:00 2001 From: Dierk Koenig Date: Sat, 16 Jan 2016 17:14:29 +0100 Subject: release version 0.7 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 400632e..8d48949 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ targetCompatibility = 1.7 ext { baseVersion = "0.7" - isSnapshot = true + isSnapshot = false snapshotAppendix = "-SNAPSHOT" projectVersion = baseVersion + (isSnapshot ? snapshotAppendix : "") projectGroup = "org.frege-lang" -- cgit From 0e99f188dabd04e9b7e99ba99f41fe047da65212 Mon Sep 17 00:00:00 2001 From: Dierk Koenig Date: Sat, 16 Jan 2016 17:23:53 +0100 Subject: start 0.8 release train --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 8d48949..911096c 100644 --- a/build.gradle +++ b/build.gradle @@ -11,8 +11,8 @@ sourceCompatibility = 1.7 targetCompatibility = 1.7 ext { - baseVersion = "0.7" - isSnapshot = false + baseVersion = "0.8" + isSnapshot = true snapshotAppendix = "-SNAPSHOT" projectVersion = baseVersion + (isSnapshot ? snapshotAppendix : "") projectGroup = "org.frege-lang" -- cgit