polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [1/2] polygene-java git commit: :tools:generator better test names
Date Mon, 05 Jun 2017 16:41:23 GMT
Repository: polygene-java
Updated Branches:
  refs/heads/develop 00568e84d -> 833bc8e8a


:tools:generator better test names

shorter, easier on the filesystem


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/275ea229
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/275ea229
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/275ea229

Branch: refs/heads/develop
Commit: 275ea229fdee6a873b82229bebede1ce3cc3272e
Parents: 00568e8
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Mon Jun 5 18:39:52 2017 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Mon Jun 5 18:39:52 2017 +0200

----------------------------------------------------------------------
 tools/generator-polygene/test/generator_test.js | 21 ++++++++++----------
 1 file changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/275ea229/tools/generator-polygene/test/generator_test.js
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/test/generator_test.js b/tools/generator-polygene/test/generator_test.js
index 7fb64a0..a5c2874 100644
--- a/tools/generator-polygene/test/generator_test.js
+++ b/tools/generator-polygene/test/generator_test.js
@@ -135,22 +135,21 @@ if(process.env.TEST_ALL == 'yes') {
 
 function test(appType, entityStore, indexing, serialization, caching, metrics, features)
{
     describe('polygene-generator', function () {
-        var testName = 'generates a Gradle buildable Apache Polygene project with '
-            + entityStore + 'EntityStore, '
-            + indexing + 'Indexing, '
-            + serialization + 'Serialization, '
-            + caching + 'Caching, '
-            + metrics + 'Metrics';
-        if(features) {
-            testName += ', and ' + features;
+        var testName = appType + ' with '
+            + entityStore + ' EntityStore - '
+            + indexing + ' Indexing - '
+            + serialization + ' Serialization - '
+            + caching + ' Caching - '
+            + metrics + ' Metrics';
+        if(features && features.length > 0) {
+            testName += ' - ' + features.toString().replace(new RegExp(',', 'g'), ' - ');
         }
-        testName += '.';
-        var testDirName = testName.replace(new RegExp('[, ]','g'), '_');
+        var testDirName = testName.replace(new RegExp(' - ', 'g'), '_').replace(new RegExp('
', 'g'), '_');
         it(testName,
             function () {
                 this.timeout(30000);
                 return helpers.run(path.join(__dirname, '../app'))
-                    .inDir(path.join(__dirname, '../build/npm-test/'+testDirName))
+                    .inDir(path.join(__dirname, '../build/npm-test/' + testDirName))
                     .withPrompts({
                         name: 'TestProject',
                         packageName: 'org.apache.polygene.generator.test',


Mime
View raw message