You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by er...@apache.org on 2021/08/02 05:30:46 UTC

[cordova-android] branch ci/connectedAndroidTest updated (789577d -> f3e98c8)

This is an automated email from the ASF dual-hosted git repository.

erisu pushed a change to branch ci/connectedAndroidTest
in repository https://gitbox.apache.org/repos/asf/cordova-android.git.


 discard 789577d  refactor: rename java_unit_tests command & test runner file
 discard 363ab36  refactor: java test runner
 discard c16e5d0  fix: add androidx.test:rules library
 discard 1447636  ci: add Java instrumentation tests
     add 9027130  fix: maven-publish setup (#1295)
     add a9171c3  android-v10.0.1 Updated version and RELEASENOTES.md for release 10.0.1
     add e69ab6a  chore: bump version 10.0.2-dev
     add 4e5892c  chore: bump version 10.1.0-dev (#1301)
     add 1636d70  feat: support http w/ content src fix (#1298)
     add 565ac9c  fix: fall back to project root repositories.gradle (#1300)
     add cba3410  feat: bump kotlin@1.5.21 (#1302)
     add b6c5db3  feat: bump Google Services Gradle Plugin@4.3.8 (#1303)
     new f4a0e1e  ci: add Java instrumentation tests
     new cd49902  fix: add androidx.test:rules library
     new bbc9bca  refactor: java test runner
     new f3e98c8  refactor: rename java_unit_tests command & test runner file

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (789577d)
            \
             N -- N -- N   refs/heads/ci/connectedAndroidTest (f3e98c8)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 RELEASENOTES.md                                    | 14 ++++++
 framework/build.gradle                             |  8 +++-
 framework/cdv-gradle-config-defaults.json          |  4 +-
 framework/cordova-publish.gradle                   | 48 ++++++++++++++++++++-
 .../src/org/apache/cordova/ConfigXmlParser.java    | 50 ++++++++++++++++------
 .../src/org/apache/cordova/CordovaWebView.java     |  2 +-
 package-lock.json                                  |  2 +-
 package.json                                       |  2 +-
 templates/project/app/build.gradle                 |  8 +++-
 templates/project/build.gradle                     |  8 +++-
 10 files changed, 123 insertions(+), 23 deletions(-)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-android] 01/04: ci: add Java instrumentation tests

Posted by er...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch ci/connectedAndroidTest
in repository https://gitbox.apache.org/repos/asf/cordova-android.git

commit f4a0e1ec78e301e747abb0ba46aba60ec68736b6
Author: Erisu <el...@gmail.com>
AuthorDate: Tue Jul 27 13:33:32 2021 +0900

    ci: add Java instrumentation tests
---
 test/run_java_unit_tests.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/run_java_unit_tests.js b/test/run_java_unit_tests.js
index ba41e3a..d118477 100644
--- a/test/run_java_unit_tests.js
+++ b/test/run_java_unit_tests.js
@@ -61,7 +61,9 @@ class AndroidTestRunner {
             .then(_ => this._gradlew('--version'))
             .then(_ => console.log(`[${this.testTitle}] Gradle wrapper is ready. Running tests now.`))
             .then(_ => this._gradlew('test'))
-            .then(_ => console.log(`[${this.testTitle}] Java unit tests completed successfully`));
+            .then(_ => console.log(`[${this.testTitle}] Java unit tests completed successfully`))
+            .then(_ => this._gradlew('connectedAndroidTest'))
+            .then(_ => console.log(`[${this.testTitle}] Java instrumentation tests completed successfully`));
     }
 }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-android] 04/04: refactor: rename java_unit_tests command & test runner file

Posted by er...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch ci/connectedAndroidTest
in repository https://gitbox.apache.org/repos/asf/cordova-android.git

commit f3e98c8651bcf981b493f78013aea642cad527b4
Author: Erisu <el...@gmail.com>
AuthorDate: Tue Jul 27 14:55:46 2021 +0900

    refactor: rename java_unit_tests command & test runner file
---
 package.json                                         | 6 +++---
 test/clean.js                                        | 2 +-
 test/{run_java_unit_tests.js => java_test_runner.js} | 0
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/package.json b/package.json
index 988e0cf..577358d 100644
--- a/package.json
+++ b/package.json
@@ -12,13 +12,13 @@
   ],
   "scripts": {
     "prepare": "cordova-js build > templates/project/assets/www/cordova.js",
-    "test": "npm run lint && npm run cover && npm run java-unit-tests",
+    "test": "npm run lint && npm run cover && npm run java-tests",
     "lint": "eslint lib spec test \"templates/cordova/**/!(*.*)\"",
     "unit-tests": "jasmine --config=spec/unit/jasmine.json",
     "cover": "nyc jasmine --config=spec/coverage.json",
     "e2e-tests": "jasmine --config=spec/e2e/jasmine.json",
-    "java-unit-tests": "node test/run_java_unit_tests.js",
-    "clean:java-unit-tests": "node test/clean.js"
+    "java-tests": "node test/java_test_runner.js",
+    "clean:java-tests": "node test/clean.js"
   },
   "author": "Apache Software Foundation",
   "license": "Apache-2.0",
diff --git a/test/clean.js b/test/clean.js
index 88148cd..16cc18c 100644
--- a/test/clean.js
+++ b/test/clean.js
@@ -21,7 +21,7 @@ const fs = require('fs-extra');
 const path = require('path');
 
 /**
- * This script is to be run manually (e.g. by npm run clean:java-unit-tests) if
+ * This script is to be run manually (e.g. by npm run clean:java-tests) if
  * you want to upgrade gradlew or test its proper generation.
  */
 
diff --git a/test/run_java_unit_tests.js b/test/java_test_runner.js
similarity index 100%
rename from test/run_java_unit_tests.js
rename to test/java_test_runner.js

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-android] 02/04: fix: add androidx.test:rules library

Posted by er...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch ci/connectedAndroidTest
in repository https://gitbox.apache.org/repos/asf/cordova-android.git

commit cd49902ca3cf9ba3afe1738c0572c1bf0a959559
Author: Erisu <el...@gmail.com>
AuthorDate: Tue Jul 27 14:22:52 2021 +0900

    fix: add androidx.test:rules library
---
 test/androidx/app/build.gradle | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/androidx/app/build.gradle b/test/androidx/app/build.gradle
index 747cecb..7d528b7 100644
--- a/test/androidx/app/build.gradle
+++ b/test/androidx/app/build.gradle
@@ -56,6 +56,8 @@ dependencies {
     androidTestImplementation('androidx.test.espresso:espresso-web:3.1.1', {
         exclude group: 'androidx.test.espresso', module: 'androidx.annotation'
     })
+
+    androidTestImplementation 'androidx.test:rules:1.4.0'
 }
 repositories {
     google()

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-android] 03/04: refactor: java test runner

Posted by er...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch ci/connectedAndroidTest
in repository https://gitbox.apache.org/repos/asf/cordova-android.git

commit bbc9bcae141ca2a553dd32f404c94aa4231823df
Author: Erisu <el...@gmail.com>
AuthorDate: Tue Jul 27 14:52:54 2021 +0900

    refactor: java test runner
---
 test/run_java_unit_tests.js | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/test/run_java_unit_tests.js b/test/run_java_unit_tests.js
index d118477..4e0df3e 100644
--- a/test/run_java_unit_tests.js
+++ b/test/run_java_unit_tests.js
@@ -46,9 +46,13 @@ class AndroidTestRunner {
         return new ProjectBuilder(this.projectDir).runGradleWrapper('gradle');
     }
 
+    _log (...args) {
+        console.log.apply(console, [`[${this.testTitle}]`, ...args])
+    }
+
     run () {
         return Promise.resolve()
-            .then(_ => console.log(`[${this.testTitle}] Preparing Gradle wrapper for Java unit tests.`))
+            .then(_ => this._log('Staging Project Files'))
             .then(_ => {
                 // TODO we should probably not only copy these files, but instead create a new project from scratch
                 fs.copyFileSync(path.resolve(this.projectDir, '../../framework/cdv-gradle-config-defaults.json'), path.resolve(this.projectDir, 'cdv-gradle-config.json'));
@@ -57,28 +61,35 @@ class AndroidTestRunner {
                     path.join(this.projectDir, 'app/src/main/assets/www/cordova.js')
                 );
             })
+
+            .then(_ => this._log('Creating Gradle Wrapper'))
             .then(_ => this._createProjectBuilder())
+
+            .then(_ => this._log('Getting Gradle Wrapper Version Info'))
             .then(_ => this._gradlew('--version'))
-            .then(_ => console.log(`[${this.testTitle}] Gradle wrapper is ready. Running tests now.`))
+
+            .then(_ => this._log('Running Java Unit Tests'))
             .then(_ => this._gradlew('test'))
-            .then(_ => console.log(`[${this.testTitle}] Java unit tests completed successfully`))
+            .then(_ => this._log('Finished Java Unit Test'))
+
+            .then(_ => this._log('Running Java Instrumentation Tests'))
             .then(_ => this._gradlew('connectedAndroidTest'))
-            .then(_ => console.log(`[${this.testTitle}] Java instrumentation tests completed successfully`));
+            .then(_ => this._log('Finished Java Instrumentation Tests'))
     }
 }
 
 Promise.resolve()
-    .then(_ => console.log('Starting to run all android platform tests'))
+    .then(_ => console.log('Starting Android Platform Java Tests'))
 
     // AndroidX Test
     .then(_ => new AndroidTestRunner('AndroidX Project', path.resolve(__dirname, 'androidx')))
     .then(test => test.run())
 
-    .then(_ => console.log('Finished running all android platform tests'));
+    .then(_ => console.log('Finished Running Android Platform Java Tests'));
 
 process.on('unhandledRejection', err => {
     // If err has a stderr property, we have seen the message already
     if (!('stderr' in err)) console.error(err.message);
-    console.error('JAVA UNIT TESTS FAILED!');
+    console.error('JAVA TESTS FAILED!');
     process.exitCode = err.code || 1;
 });

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org