You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2018/02/07 15:57:54 UTC
[cordova-windows] branch janpio-CB-13829 updated (7093434 ->
3bdd6b5)
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a change to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git.
omit 7093434 Improve readability of logging
omit e473f0b move 6a down so more tests run
omit fe505f9 debug 6a problem with vs17 that is not reproducible locally
omit 163d1db remove duplicated test and re-number tests
omit 57711db default value that old nodes also understand
omit b7c9186 fix
omit ab809e6 default value for buildConfig that old nodes also understand
omit 9435308 silent tests with less output again
omit 0a4adea more tests fixed
omit 781c5e9 remove duplicated getBuildTargets (and update its internal usage)
omit e2790a5 add test for new override
omit 332a017 add build target override `8.1` (8.1-win + 8.1-phone)
omit f02e419 extrat file and subdir+file expect code into function
omit aabbf01 document/structure current state of tests (although some are still failing)
omit 5840c51 fix first failing test for new default `appx`
omit abbecdc CB-13829 Introduce variable `silent` to control output of commands
add 8322103 CB-11968: Add support for config-file in config.xml (#235)
new d38462b CB-13829 Introduce variable `silent` to control output of commands
new 256cd6a fix first failing test for new default `appx`
new 28a48b4 document/structure current state of tests (although some are still failing)
new 92c48ca extrat file and subdir+file expect code into function
new 52427f6 add build target override `8.1` (8.1-win + 8.1-phone)
new 8c18f6a add test for new override
new 37ddb86 remove duplicated getBuildTargets (and update its internal usage)
new f365642 more tests fixed
new a4ec7ac silent tests with less output again
new 97cd60a default value for buildConfig that old nodes also understand
new 98c7562 fix
new f024069 default value that old nodes also understand
new a11ce1d remove duplicated test and re-number tests
new 9bd2788 debug 6a problem with vs17 that is not reproducible locally
new 40590bd move 6a down so more tests run
new 3bdd6b5 Improve readability of logging
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 (7093434)
\
N -- N -- N refs/heads/janpio-CB-13829 (3bdd6b5)
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 16 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:
node_modules/big-integer/BigInteger.d.ts | 2369 ++++++++++++++++++++
node_modules/big-integer/BigInteger.js | 121 +-
node_modules/big-integer/BigInteger.min.js | 2 +-
node_modules/big-integer/README.md | 11 +-
node_modules/big-integer/bower.json | 1 -
node_modules/big-integer/package.json | 78 +-
node_modules/big-integer/tsconfig.json | 25 +
node_modules/cordova-common/.eslintignore | 1 +
.../cordova-common/.eslintrc.yml | 3 +-
node_modules/cordova-common/.jshintignore | 1 -
node_modules/cordova-common/.npmignore | 2 -
node_modules/cordova-common/.ratignore | 1 +
.../cordova-common/.travis.yml | 11 +-
node_modules/cordova-common/README.md | 4 +
node_modules/cordova-common/RELEASENOTES.md | 36 +
node_modules/cordova-common/appveyor.yml | 19 +
node_modules/cordova-common/package.json | 115 +-
node_modules/cordova-common/src/.jshintrc | 10 -
node_modules/cordova-common/src/ActionStack.js | 30 +-
.../src/ConfigChanges/ConfigChanges.js | 145 +-
.../cordova-common/src/ConfigChanges/ConfigFile.js | 125 +-
.../src/ConfigChanges/ConfigKeeper.js | 9 +-
.../cordova-common/src/ConfigChanges/munge-util.js | 45 +-
.../src/ConfigParser/ConfigParser.js | 265 ++-
node_modules/cordova-common/src/CordovaCheck.js | 14 +-
.../src/CordovaError/CordovaError.js | 25 +-
.../CordovaExternalToolErrorContext.js | 6 +-
node_modules/cordova-common/src/CordovaLogger.js | 18 +-
node_modules/cordova-common/src/FileUpdater.js | 141 +-
node_modules/cordova-common/src/PlatformJson.js | 71 +-
.../cordova-common/src/PluginInfo/PluginInfo.js | 200 +-
.../src/PluginInfo/PluginInfoProvider.js | 14 +-
node_modules/cordova-common/src/PluginManager.js | 93 +-
node_modules/cordova-common/src/events.js | 4 +-
node_modules/cordova-common/src/superspawn.js | 31 +-
.../cordova-common/src/util/addProperty.js | 4 +-
.../cordova-common/src/util/plist-helpers.js | 51 +-
.../cordova-common/src/util/xml-helpers.js | 137 +-
package.json | 2 +-
spec/unit/ConfigChanges.spec.js | 9 +-
spec/unit/WindowsConfigParser.spec.js | 15 +
template/cordova/Api.js | 3 +
template/cordova/lib/AppxManifest.js | 93 +
template/cordova/lib/ConfigParser.js | 6 +
template/cordova/lib/PluginInfo.js | 99 +-
45 files changed, 3479 insertions(+), 986 deletions(-)
create mode 100644 node_modules/big-integer/BigInteger.d.ts
create mode 100644 node_modules/big-integer/tsconfig.json
create mode 100644 node_modules/cordova-common/.eslintignore
copy .eslintrc.yml => node_modules/cordova-common/.eslintrc.yml (83%)
delete mode 100644 node_modules/cordova-common/.jshintignore
delete mode 100644 node_modules/cordova-common/.npmignore
copy .travis.yml => node_modules/cordova-common/.travis.yml (50%)
create mode 100644 node_modules/cordova-common/appveyor.yml
delete mode 100644 node_modules/cordova-common/src/.jshintrc
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 16/16: Improve readability of logging
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit 3bdd6b5a94e59e17558aa6d102ae1830de6fb317
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Wed Feb 7 16:56:10 2018 +0100
Improve readability of logging
---
template/cordova/lib/MSBuildTools.js | 1 +
template/cordova/prebuild.js | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/template/cordova/lib/MSBuildTools.js b/template/cordova/lib/MSBuildTools.js
index b54ed05..7710372 100644
--- a/template/cordova/lib/MSBuildTools.js
+++ b/template/cordova/lib/MSBuildTools.js
@@ -34,6 +34,7 @@ MSBuildTools.prototype.buildProject = function (projFile, buildType, buildarch,
events.emit('log', 'Building project: ' + projFile);
events.emit('log', '\tConfiguration : ' + buildType);
events.emit('log', '\tPlatform : ' + buildarch);
+ events.emit('log', '\tBuildflags : ' + buildFlags);
var checkWinSDK = function (target_platform) {
return require('./check_reqs').isWinSDKPresent(target_platform);
diff --git a/template/cordova/prebuild.js b/template/cordova/prebuild.js
index bd708e4..e595923 100644
--- a/template/cordova/prebuild.js
+++ b/template/cordova/prebuild.js
@@ -23,7 +23,7 @@
/* eslint no-useless-escape : 0 */
module.exports = function patch (platform) {
- console.log('Patching ' + platform + ' in prebuild event...');
+ console.log('Prebuild: Patching platform `' + platform + '`');
var shell = require('shelljs');
var path = require('path');
@@ -75,7 +75,7 @@ module.exports = function patch (platform) {
var subst = '$1<script type="text/javascript" src="' + basejsSrc + '"></script>\n$1$2';
shell.sed('-i', appendBaseJsRe, subst, startPageFilePath);
- console.log('Injected base.js reference to the ' + startPage);
+ console.log('Injected `base.js` reference to `' + startPage + '`');
// 4. Remove all 'wrong' base.js references, which might left from another project type build:
for (var plat in basejsSrcMap) {
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 12/16: default value that old nodes also
understand
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit f0240690225d991674115ba9f3d34208093675ef
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Jan 25 22:50:48 2018 +0100
default value that old nodes also understand
---
spec/e2e/endtoend.spec.js | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/spec/e2e/endtoend.spec.js b/spec/e2e/endtoend.spec.js
index 41a19bf..8a012a5 100644
--- a/spec/e2e/endtoend.spec.js
+++ b/spec/e2e/endtoend.spec.js
@@ -35,19 +35,24 @@ describe('Cordova create and build', function () {
var appPackagesFolder = path.join(buildDirectory, projectFolder, 'AppPackages');
var buildScriptPath = '"' + path.join(buildDirectory, projectFolder, 'cordova', 'build') + '"';
var silent = true;
+ function verifySubDirContainsFile (subDirName, fileName, count) {
+ count = typeof count !== 'undefined' ? count : 1;
- function verifySubDirContainsFile (subDirName, fileName, count = 1) {
var subDir = path.join(appPackagesFolder, subDirName);
var packages = shell.ls(subDir);
expect(packages.filter(function (file) { return file.match(fileName); }).length).toBe(count);
}
- function _expectExist (fileNamePattern, count = 1) {
+ function _expectExist (fileNamePattern, count) {
+ count = typeof count !== 'undefined' ? count : 1;
+
var packages = shell.ls(appPackagesFolder);
expect(packages.filter(function (file) { return file.match(fileNamePattern); }).length).toBe(count);
}
- function _expectSubdirAndFileExist (subDirName, fileName, count = 1) {
+ function _expectSubdirAndFileExist (subDirName, fileName, count) {
+ count = typeof count !== 'undefined' ? count : 1;
+
_expectExist(subDirName);
verifySubDirContainsFile(subDirName, fileName, count);
}
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 02/16: fix first failing test for new default
`appx`
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit 256cd6ad0d47d221d68429403e9448c8315dcf19
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Jan 25 16:10:46 2018 +0100
fix first failing test for new default `appx`
---
spec/e2e/endtoend.spec.js | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/spec/e2e/endtoend.spec.js b/spec/e2e/endtoend.spec.js
index c3e3f96..4facaca 100644
--- a/spec/e2e/endtoend.spec.js
+++ b/spec/e2e/endtoend.spec.js
@@ -55,11 +55,24 @@ describe('Cordova create and build', function () {
expect(fs.existsSync(projectFolder)).toBe(true);
});
- it('spec.2 should build project', function () {
+ it('spec.2a should build default (win10) project', function () {
shell.exec(buildScriptPath + '', {silent: silent});
var packages = shell.ls(appPackagesFolder);
- expect(packages.filter(function (file) { return file.match(/.*Phone.*\.appx.*/); }).length).toBe(1);
- expect(packages.filter(function (file) { return file.match(/.*Windows.*\.appx.*/); }).length).toBe(1);
+ var subDir = 'CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test';
+ expect(packages.filter(function (file) { return file.match(subDir); }).length).toBe(1);
+ verifySubDirContainsFile(subDir, 'CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx');
+ });
+
+ it('spec.2b should build 8.1 win project', function () {
+ shell.exec(buildScriptPath + ' --appx=8.1-win', {silent: silent});
+ var packages = shell.ls(appPackagesFolder);
+ expect(packages.filter(function (file) { return file.match(/.*Windows.*\.appxupload/); }).length).toBe(1);
+ });
+
+ it('spec.2c should build 8.1 phone project', function () {
+ shell.exec(buildScriptPath + ' --appx=8.1-phone', {silent: silent});
+ var packages = shell.ls(appPackagesFolder);
+ expect(packages.filter(function (file) { return file.match(/.*Phone.*\.appxupload*/); }).length).toBe(1);
});
it('spec.3 should build project for particular CPU', function () {
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 08/16: more tests fixed
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit f365642ff7c2d6001df139535af2d33b51bc8a2c
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Jan 25 19:12:16 2018 +0100
more tests fixed
---
spec/e2e/endtoend.spec.js | 174 +++++++++++++++++++++++-------------------
template/cordova/lib/build.js | 5 +-
2 files changed, 96 insertions(+), 83 deletions(-)
diff --git a/spec/e2e/endtoend.spec.js b/spec/e2e/endtoend.spec.js
index 49484ea..7c3e05c 100644
--- a/spec/e2e/endtoend.spec.js
+++ b/spec/e2e/endtoend.spec.js
@@ -34,23 +34,22 @@ describe('Cordova create and build', function () {
var buildDirectory = path.join(__dirname, '../..');
var appPackagesFolder = path.join(buildDirectory, projectFolder, 'AppPackages');
var buildScriptPath = '"' + path.join(buildDirectory, projectFolder, 'cordova', 'build') + '"';
- var silent = true;
+ var silent = false;
- function verifySubDirContainsFile (subDirName, fileName) {
+ function verifySubDirContainsFile (subDirName, fileName, count = 1) {
var subDir = path.join(appPackagesFolder, subDirName);
var packages = shell.ls(subDir);
- expect(packages.filter(function (file) { return file.match(fileName); }).length).toBe(1);
+ expect(packages.filter(function (file) { return file.match(fileName); }).length).toBe(count);
}
- function _expectExist(fileNamePattern) {
+ function _expectExist (fileNamePattern, count = 1) {
var packages = shell.ls(appPackagesFolder);
- expect(packages.filter(function (file) { return file.match(fileNamePattern); }).length).toBe(1);
+ expect(packages.filter(function (file) { return file.match(fileNamePattern); }).length).toBe(count);
}
- function _expectSubdirAndFileExist(subDirName, fileName) {
- var packages = shell.ls(appPackagesFolder);
+ function _expectSubdirAndFileExist (subDirName, fileName, count = 1) {
_expectExist(subDirName);
- verifySubDirContainsFile(subDirName, fileName);
+ verifySubDirContainsFile(subDirName, fileName, count);
}
beforeEach(function () {
@@ -67,7 +66,7 @@ describe('Cordova create and build', function () {
});
// default
-
+
it('spec.2 should build default (win10) project', function () {
shell.exec(buildScriptPath + '', {silent: silent});
_expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test', 'CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx');
@@ -97,30 +96,51 @@ describe('Cordova create and build', function () {
});
// --archs
-
- it('spec.3 should build project for particular CPU', function () {
+
+ it('spec.3a should build project for particular CPU', function () {
shell.exec(buildScriptPath + ' --archs=\"x64\"', {silent: silent}); /* eslint no-useless-escape : 0 */
- var packages = shell.ls(appPackagesFolder);
- expect(packages.filter(function (file) { return file.match(/.*Phone.*x64.*\.appx.*/); }).length).toBe(1);
- expect(packages.filter(function (file) { return file.match(/.*Windows.*x64.*\.appx.*/); }).length).toBe(1);
+ _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_x64_debug_Test', 'CordovaApp.Windows10_1.0.0.0_x64_debug.appx');
});
- it('spec.4 should build project for CPUs separated by whitespaces', function () {
+ it('spec.3b should build project for particular CPU', function () {
+ shell.exec(buildScriptPath + ' --appx=8.1 --archs=\"x64\"', {silent: silent}); /* eslint no-useless-escape : 0 */
+ _expectExist(/.*Phone.*x64.*\.appxupload/);
+ _expectExist(/.*Windows.*x64.*\.appxupload/);
+ });
+
+ it('spec.3c should build project for particular CPU', function () {
+ shell.exec(buildScriptPath + ' --appx=8.1-win --archs=\"x64\"', {silent: silent}); /* eslint no-useless-escape : 0 */
+ _expectExist(/.*Windows.*x64.*\.appxupload/);
+ });
+
+ it('spec.3d should build project for particular CPU', function () {
+ shell.exec(buildScriptPath + ' --appx=8.1-phone --archs=\"x64\"', {silent: silent}); /* eslint no-useless-escape : 0 */
+ _expectExist(/.*Phone.*x64.*\.appxupload/);
+ });
+
+ it('spec.4a should build project for CPUs separated by whitespaces', function () {
shell.exec(buildScriptPath + ' --archs=\"x64 x86 arm anycpu\"', {silent: silent}); /* eslint no-useless-escape : 0 */
- var packages = shell.ls(appPackagesFolder);
- expect(packages.filter(function (file) { return file.match(/.*Phone.*x86.*\.appx.*/); }).length).toBe(1);
- expect(packages.filter(function (file) { return file.match(/.*Phone.*x64.*\.appx.*/); }).length).toBe(1);
- expect(packages.filter(function (file) { return file.match(/.*Phone.*arm.*\.appx.*/); }).length).toBe(1);
- expect(packages.filter(function (file) { return file.match(/.*Phone.*AnyCPU.*\.appx.*/i); }).length).toBe(1);
- expect(packages.filter(function (file) { return file.match(/.*Windows.*x64.*\.appx.*/); }).length).toBe(1);
- expect(packages.filter(function (file) { return file.match(/.*Windows.*x86.*\.appx.*/); }).length).toBe(1);
- expect(packages.filter(function (file) { return file.match(/.*Windows.*arm.*\.appx.*/); }).length).toBe(1);
- expect(packages.filter(function (file) { return file.match(/.*Windows.*anycpu.*\.appx.*/i); }).length).toBe(1);
+ _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_x64_debug_Test', 'CordovaApp.Windows10_1.0.0.0_x64_debug.appx');
+ _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_x86_debug_Test', 'CordovaApp.Windows10_1.0.0.0_x86_debug.appx');
+ _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_arm_debug_Test', 'CordovaApp.Windows10_1.0.0.0_arm_debug.appx');
+ _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test', 'CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx');
+ });
+
+ it('spec.4b should build project for CPUs separated by whitespaces', function () {
+ shell.exec(buildScriptPath + ' --appx=8.1 --archs=\"x64 x86 arm anycpu\"', {silent: silent}); /* eslint no-useless-escape : 0 */
+ _expectExist(/.*Phone.*x86.*\.appxupload/);
+ _expectExist(/.*Phone.*x64.*\.appxupload/);
+ _expectExist(/.*Phone.*arm.*\.appxupload/);
+ _expectExist(/.*Phone.*AnyCPU.*\.appxupload/i);
+ _expectExist(/.*Windows.*x64.*\.appxupload/);
+ _expectExist(/.*Windows.*x86.*\.appxupload/);
+ _expectExist(/.*Windows.*arm.*\.appxupload/);
+ _expectExist(/.*Windows.*anycpu.*\.appxupload/i);
});
// "InProcessServer extension"
- it('spec.5 should build project containing plugin with InProcessServer extension', function (done) {
+ it('spec.5a should build project containing plugin with InProcessServer extension', function (done) {
var extensionsPluginInfo, api;
extensionsPluginInfo = new PluginInfo(extensionsPlugin);
@@ -137,9 +157,7 @@ describe('Cordova create and build', function () {
api.addPlugin(extensionsPluginInfo)
.then(function () {
shell.exec(buildScriptPath, {silent: silent});
- var packages = shell.ls(appPackagesFolder);
- expect(packages.filter(function (file) { return file.match(/.*Phone.*\.appx.*/); }).length).toBe(1);
- expect(packages.filter(function (file) { return file.match(/.*Windows.*\.appx.*/); }).length).toBe(1);
+ _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test', 'CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx');
})
.catch(fail)
.finally(function () {
@@ -148,74 +166,70 @@ describe('Cordova create and build', function () {
});
});
- // --release 8.1
+ it('spec.5b should build project (8.1) containing plugin with InProcessServer extension', function (done) {
+ var extensionsPluginInfo, api;
- it('spec.6 should generate appxupload and appxbundle for Windows 8.1 project bundle release build', function () {
- shell.exec(buildScriptPath + ' --release --win --bundle --archs=\"x64 x86 arm\"', {silent: silent});
- var packages = shell.ls(appPackagesFolder);
- expect(packages.filter(function (file) { return file.match(/.*bundle\.appxupload$/); }).length > 0).toBeTruthy();
+ extensionsPluginInfo = new PluginInfo(extensionsPlugin);
+ api = new Api();
+ api.root = projectFolder;
+ api.locations.root = projectFolder;
+ api.locations.www = path.join(projectFolder, 'www');
- var bundleDirName = 'CordovaApp.Windows_1.0.0.0_Test';
- expect(packages.filter(function (file) { return file.match(bundleDirName); }).length).toBe(1);
+ var fail = jasmine.createSpy('fail')
+ .and.callFake(function (err) {
+ console.error(err);
+ });
- verifySubDirContainsFile(bundleDirName, 'CordovaApp.Windows_1.0.0.0_x64_x86_arm.appxbundle');
+ api.addPlugin(extensionsPluginInfo)
+ .then(function () {
+ shell.exec(buildScriptPath + ' --appx=8.1', {silent: silent});
+ _expectExist(/.*Windows.*\.appxupload/);
+ _expectExist(/.*Phone.*\.appxupload/);
+ })
+ .catch(fail)
+ .finally(function () {
+ expect(fail).not.toHaveBeenCalled();
+ done();
+ });
});
- it('spec.6.1 should generate appxupload for Windows 8.1 project non-bundle release build', function () {
- shell.exec(buildScriptPath + ' --release --win --archs=\"x64 x86 arm\"', {silent: silent});
- var packages = shell.ls(appPackagesFolder);
- expect(packages.filter(function (file) { return file.match(/.*\.appxupload$/); }).length).toBe(3);
- });
+ // --release --bundle
- // --release 10
+ it('spec.6 should generate appxupload and appxbundle for Windows 10 project bundle release build', function () {
+ shell.exec(buildScriptPath + ' --release --bundle --archs=\"x64 x86 arm\"', {silent: silent});
+ _expectExist(/.*bundle\.appxupload$/, 3);
+ _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_Test', 'CordovaApp.Windows10_1.0.0.0_x64_x86_arm.appxbundle');
+ });
it('spec.7 should generate appxupload and appxbundle for Windows 10 project bundle release build', function () {
- shell.exec(buildScriptPath + ' --release --win --appx=uap --bundle --archs=\"x64 x86 arm\"', {silent: silent});
- var packages = shell.ls(appPackagesFolder);
- expect(packages.filter(function (file) { return file.match(/.*bundle\.appxupload$/); }).length > 0).toBeTruthy();
+ shell.exec(buildScriptPath + ' --release --appx=8.1-phone --bundle --archs=\"x64 x86 arm\"', {silent: silent});
+ _expectExist(/.*bundle\.appxupload$/, 3);
+ _expectSubdirAndFileExist('CordovaApp.Phone_1.0.0.0_Test', 'CordovaApp.Phone_1.0.0.0_x64_x86_arm.appxbundle');
+ });
- var bundleDirName = 'CordovaApp.Windows10_1.0.0.0_Test';
- expect(packages.filter(function (file) { return file.match(bundleDirName); }).length).toBe(1);
+ // --release (non-bundle)
- verifySubDirContainsFile(bundleDirName, 'CordovaApp.Windows10_1.0.0.0_x64_x86_arm.appxbundle');
- });
+ it('spec.8 should generate appxupload for Windows 10 project non-bundle release build', function () {
+ shell.exec(buildScriptPath + ' --release --win --archs=\"x64 x86 arm\"', {silent: silent});
+ _expectExist(/.*\.appxupload$/, 3);
- it('spec.7.1 should generate appxupload for Windows 10 project non-bundle release build', function () {
- shell.exec(buildScriptPath + ' --release --win --appx=uap --archs=\"x64 x86 arm\"', {silent: silent});
- var packages = shell.ls(appPackagesFolder);
- expect(packages.filter(function (file) { return file.match(/.*\.appxupload$/); }).length).toBe(3);
+ });
+ it('spec.9a should generate appxupload for Windows 10 project non-bundle release build', function () {
+ shell.exec(buildScriptPath + ' --release --archs=\"x64 x86 arm\"', {silent: silent});
+ _expectExist(/.*\.appxupload$/, 3);
// CB-12416 Should build appx in separate dirs for each architecture
- var armSubDir = 'CordovaApp.Windows10_1.0.0.0_arm_Test';
- var x64SubDir = 'CordovaApp.Windows10_1.0.0.0_x64_Test';
- var x86SubDir = 'CordovaApp.Windows10_1.0.0.0_x86_Test';
-
// Should contain a subdirectory for each of the architectures
- expect(packages.filter(function (file) { return file.match(armSubDir); }).length).toBe(1);
- expect(packages.filter(function (file) { return file.match(x64SubDir); }).length).toBe(1);
- expect(packages.filter(function (file) { return file.match(x86SubDir); }).length).toBe(1);
-
// These subdirectories should contain corresponding appx files
- verifySubDirContainsFile(armSubDir, 'CordovaApp.Windows10_1.0.0.0_arm.appx');
- verifySubDirContainsFile(x64SubDir, 'CordovaApp.Windows10_1.0.0.0_x64.appx');
- verifySubDirContainsFile(x86SubDir, 'CordovaApp.Windows10_1.0.0.0_x86.appx');
+ _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_arm_Test', 'CordovaApp.Windows10_1.0.0.0_arm.appx');
+ _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_x64_Test', 'CordovaApp.Windows10_1.0.0.0_x64.appx');
+ _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_x86_Test', 'CordovaApp.Windows10_1.0.0.0_x86.appx');
});
- // --release 8.1
-
- it('spec.8 for a non-bundle case for Windows Phone 8.1 it should build appx in separate dirs for each architecture', function () {
- shell.exec(buildScriptPath + ' --release --phone --archs=\"x86 arm\"', {silent: silent});
- var packages = shell.ls(appPackagesFolder);
-
- var armSubDir = 'CordovaApp.Phone_1.0.0.0_arm_Test';
- var x86SubDir = 'CordovaApp.Phone_1.0.0.0_x86_Test';
-
- // Should contain a subdirectory for each of the architectures
- expect(packages.filter(function (file) { return file.match(armSubDir); }).length).toBe(1);
- expect(packages.filter(function (file) { return file.match(x86SubDir); }).length).toBe(1);
-
- // These subdirectories should contain corresponding appx files
- verifySubDirContainsFile(armSubDir, 'CordovaApp.Phone_1.0.0.0_arm.appx');
- verifySubDirContainsFile(x86SubDir, 'CordovaApp.Phone_1.0.0.0_x86.appx');
+ it('spec.9b for a non-bundle case for Windows Phone 8.1 it should build appx in separate dirs for each architecture', function () {
+ shell.exec(buildScriptPath + ' --release --appx=8.1-phone --phone --archs=\"x86 arm\"', {silent: silent});
+ _expectExist(/.*\.appxupload$/, 2);
+ _expectSubdirAndFileExist('CordovaApp.Phone_1.0.0.0_arm_Test', 'CordovaApp.Phone_1.0.0.0_arm.appx');
+ _expectSubdirAndFileExist('CordovaApp.Phone_1.0.0.0_x86_Test', 'CordovaApp.Phone_1.0.0.0_x86.appx');
});
});
diff --git a/template/cordova/lib/build.js b/template/cordova/lib/build.js
index e4c6113..0337fba 100644
--- a/template/cordova/lib/build.js
+++ b/template/cordova/lib/build.js
@@ -78,7 +78,6 @@ module.exports.run = function run (buildOptions) {
// returns list of projects to be built based on config.xml and additional parameters (-appx)
function getBuildTargets (isWinSwitch, isPhoneSwitch, projOverride, buildConfig = null) {
-
var configXML = new ConfigParser(path.join(ROOT, 'config.xml'));
var targets = [];
var noSwitches = !(isPhoneSwitch || isWinSwitch);
@@ -144,7 +143,7 @@ function getBuildTargets (isWinSwitch, isPhoneSwitch, projOverride, buildConfig
}
}
- if(buildConfig !== null) {
+ if (buildConfig !== null) {
// As part of reworking how build and package determine the winning project, set the 'target type' project
// as part of build configuration. This will be used for determining the binary to 'run' after build is done.
if (targets.length > 0) {
@@ -165,7 +164,7 @@ function getBuildTargets (isWinSwitch, isPhoneSwitch, projOverride, buildConfig
}
return targets;
-};
+}
module.exports.getBuildTargets = getBuildTargets;
/**
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 05/16: add build target override `8.1` (8.1-win +
8.1-phone)
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit 52427f65a140a477de4fbcd25f082c88634738e6
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Jan 25 17:04:38 2018 +0100
add build target override `8.1` (8.1-win + 8.1-phone)
---
template/cordova/lib/build.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/template/cordova/lib/build.js b/template/cordova/lib/build.js
index 5a2934d..2f3ef8d 100644
--- a/template/cordova/lib/build.js
+++ b/template/cordova/lib/build.js
@@ -81,6 +81,8 @@ module.exports.getBuildTargets = function (isWinSwitch, isPhoneSwitch, projOverr
// apply build target override if one was specified
if (projOverride) {
switch (projOverride.toLowerCase()) {
+ case '8.1':
+ return [projFiles.win, projFiles.phone];
case '8.1-phone':
return [projFiles.phone];
case '8.1-win':
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 11/16: fix
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit 98c756292b94993e02483a6445e601e6ea83f30d
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Jan 25 22:42:48 2018 +0100
fix
---
template/cordova/lib/build.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/template/cordova/lib/build.js b/template/cordova/lib/build.js
index 5b9508e..eeaa7e3 100644
--- a/template/cordova/lib/build.js
+++ b/template/cordova/lib/build.js
@@ -77,7 +77,7 @@ module.exports.run = function run (buildOptions) {
// returns list of projects to be built based on config.xml and additional parameters (-appx)
function getBuildTargets (isWinSwitch, isPhoneSwitch, projOverride, buildConfig) {
- buildConfig = typeof buildConfig !== 'undefined' ? buildConfig : null;
+ buildConfig = typeof buildConfig !== 'undefined' ? buildConfig : null;
var configXML = new ConfigParser(path.join(ROOT, 'config.xml'));
var targets = [];
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 10/16: default value for buildConfig that old
nodes also understand
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit 97cd60a29a7c493225447d7bfdb68d699f19f62f
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Jan 25 22:18:15 2018 +0100
default value for buildConfig that old nodes also understand
---
template/cordova/lib/build.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/template/cordova/lib/build.js b/template/cordova/lib/build.js
index 0337fba..5b9508e 100644
--- a/template/cordova/lib/build.js
+++ b/template/cordova/lib/build.js
@@ -76,7 +76,8 @@ module.exports.run = function run (buildOptions) {
};
// returns list of projects to be built based on config.xml and additional parameters (-appx)
-function getBuildTargets (isWinSwitch, isPhoneSwitch, projOverride, buildConfig = null) {
+function getBuildTargets (isWinSwitch, isPhoneSwitch, projOverride, buildConfig) {
+ buildConfig = typeof buildConfig !== 'undefined' ? buildConfig : null;
var configXML = new ConfigParser(path.join(ROOT, 'config.xml'));
var targets = [];
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 01/16: CB-13829 Introduce variable `silent` to
control output of commands
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit d38462b362f739e2ea2665db82496099e5f7a1fb
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Jan 25 16:08:20 2018 +0100
CB-13829 Introduce variable `silent` to control output of commands
---
spec/e2e/endtoend.spec.js | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/spec/e2e/endtoend.spec.js b/spec/e2e/endtoend.spec.js
index 1fb8cc5..c3e3f96 100644
--- a/spec/e2e/endtoend.spec.js
+++ b/spec/e2e/endtoend.spec.js
@@ -34,6 +34,7 @@ describe('Cordova create and build', function () {
var buildDirectory = path.join(__dirname, '../..');
var appPackagesFolder = path.join(buildDirectory, projectFolder, 'AppPackages');
var buildScriptPath = '"' + path.join(buildDirectory, projectFolder, 'cordova', 'build') + '"';
+ var silent = true;
function verifySubDirContainsFile (subDirName, fileName) {
var subDir = path.join(appPackagesFolder, subDirName);
@@ -42,7 +43,7 @@ describe('Cordova create and build', function () {
}
beforeEach(function () {
- shell.exec(path.join('bin', 'create') + ' "' + projectFolder + '" com.test.app 応用', {silent: true});
+ shell.exec(path.join('bin', 'create') + ' "' + projectFolder + '" com.test.app 応用', {silent: silent});
});
afterEach(function () {
@@ -55,21 +56,21 @@ describe('Cordova create and build', function () {
});
it('spec.2 should build project', function () {
- shell.exec(buildScriptPath, {silent: true});
+ shell.exec(buildScriptPath + '', {silent: silent});
var packages = shell.ls(appPackagesFolder);
expect(packages.filter(function (file) { return file.match(/.*Phone.*\.appx.*/); }).length).toBe(1);
expect(packages.filter(function (file) { return file.match(/.*Windows.*\.appx.*/); }).length).toBe(1);
});
it('spec.3 should build project for particular CPU', function () {
- shell.exec(buildScriptPath + ' --archs=\"x64\"', {silent: true}); /* eslint no-useless-escape : 0 */
+ shell.exec(buildScriptPath + ' --archs=\"x64\"', {silent: silent}); /* eslint no-useless-escape : 0 */
var packages = shell.ls(appPackagesFolder);
expect(packages.filter(function (file) { return file.match(/.*Phone.*x64.*\.appx.*/); }).length).toBe(1);
expect(packages.filter(function (file) { return file.match(/.*Windows.*x64.*\.appx.*/); }).length).toBe(1);
});
it('spec.4 should build project for CPUs separated by whitespaces', function () {
- shell.exec(buildScriptPath + ' --archs=\"x64 x86 arm anycpu\"', {silent: true}); /* eslint no-useless-escape : 0 */
+ shell.exec(buildScriptPath + ' --archs=\"x64 x86 arm anycpu\"', {silent: silent}); /* eslint no-useless-escape : 0 */
var packages = shell.ls(appPackagesFolder);
expect(packages.filter(function (file) { return file.match(/.*Phone.*x86.*\.appx.*/); }).length).toBe(1);
expect(packages.filter(function (file) { return file.match(/.*Phone.*x64.*\.appx.*/); }).length).toBe(1);
@@ -97,7 +98,7 @@ describe('Cordova create and build', function () {
api.addPlugin(extensionsPluginInfo)
.then(function () {
- shell.exec(buildScriptPath, {silent: true});
+ shell.exec(buildScriptPath, {silent: silent});
var packages = shell.ls(appPackagesFolder);
expect(packages.filter(function (file) { return file.match(/.*Phone.*\.appx.*/); }).length).toBe(1);
expect(packages.filter(function (file) { return file.match(/.*Windows.*\.appx.*/); }).length).toBe(1);
@@ -110,7 +111,7 @@ describe('Cordova create and build', function () {
});
it('spec.6 should generate appxupload and appxbundle for Windows 8.1 project bundle release build', function () {
- shell.exec(buildScriptPath + ' --release --win --bundle --archs=\"x64 x86 arm\"', {silent: true});
+ shell.exec(buildScriptPath + ' --release --win --bundle --archs=\"x64 x86 arm\"', {silent: silent});
var packages = shell.ls(appPackagesFolder);
expect(packages.filter(function (file) { return file.match(/.*bundle\.appxupload$/); }).length > 0).toBeTruthy();
@@ -121,13 +122,13 @@ describe('Cordova create and build', function () {
});
it('spec.6.1 should generate appxupload for Windows 8.1 project non-bundle release build', function () {
- shell.exec(buildScriptPath + ' --release --win --archs=\"x64 x86 arm\"', {silent: true});
+ shell.exec(buildScriptPath + ' --release --win --archs=\"x64 x86 arm\"', {silent: silent});
var packages = shell.ls(appPackagesFolder);
expect(packages.filter(function (file) { return file.match(/.*\.appxupload$/); }).length).toBe(3);
});
it('spec.7 should generate appxupload and appxbundle for Windows 10 project bundle release build', function () {
- shell.exec(buildScriptPath + ' --release --win --appx=uap --bundle --archs=\"x64 x86 arm\"', {silent: true});
+ shell.exec(buildScriptPath + ' --release --win --appx=uap --bundle --archs=\"x64 x86 arm\"', {silent: silent});
var packages = shell.ls(appPackagesFolder);
expect(packages.filter(function (file) { return file.match(/.*bundle\.appxupload$/); }).length > 0).toBeTruthy();
@@ -138,7 +139,7 @@ describe('Cordova create and build', function () {
});
it('spec.7.1 should generate appxupload for Windows 10 project non-bundle release build', function () {
- shell.exec(buildScriptPath + ' --release --win --appx=uap --archs=\"x64 x86 arm\"', {silent: true});
+ shell.exec(buildScriptPath + ' --release --win --appx=uap --archs=\"x64 x86 arm\"', {silent: silent});
var packages = shell.ls(appPackagesFolder);
expect(packages.filter(function (file) { return file.match(/.*\.appxupload$/); }).length).toBe(3);
@@ -159,7 +160,7 @@ describe('Cordova create and build', function () {
});
it('spec.8 for a non-bundle case for Windows Phone 8.1 it should build appx in separate dirs for each architecture', function () {
- shell.exec(buildScriptPath + ' --release --phone --archs=\"x86 arm\"', {silent: true});
+ shell.exec(buildScriptPath + ' --release --phone --archs=\"x86 arm\"', {silent: silent});
var packages = shell.ls(appPackagesFolder);
var armSubDir = 'CordovaApp.Phone_1.0.0.0_arm_Test';
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 09/16: silent tests with less output again
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit a4ec7acc4df575689bb4cbc40ccfc99c5d4b5ac6
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Jan 25 22:07:23 2018 +0100
silent tests with less output again
---
spec/e2e/endtoend.spec.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/e2e/endtoend.spec.js b/spec/e2e/endtoend.spec.js
index 7c3e05c..41a19bf 100644
--- a/spec/e2e/endtoend.spec.js
+++ b/spec/e2e/endtoend.spec.js
@@ -34,7 +34,7 @@ describe('Cordova create and build', function () {
var buildDirectory = path.join(__dirname, '../..');
var appPackagesFolder = path.join(buildDirectory, projectFolder, 'AppPackages');
var buildScriptPath = '"' + path.join(buildDirectory, projectFolder, 'cordova', 'build') + '"';
- var silent = false;
+ var silent = true;
function verifySubDirContainsFile (subDirName, fileName, count = 1) {
var subDir = path.join(appPackagesFolder, subDirName);
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 14/16: debug 6a problem with vs17 that is not
reproducible locally
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit 9bd278859603a581520c56901dcef2be7cd10869
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Jan 25 23:38:10 2018 +0100
debug 6a problem with vs17 that is not reproducible locally
---
spec/e2e/endtoend.spec.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/spec/e2e/endtoend.spec.js b/spec/e2e/endtoend.spec.js
index 17de259..15ff8a0 100644
--- a/spec/e2e/endtoend.spec.js
+++ b/spec/e2e/endtoend.spec.js
@@ -34,7 +34,8 @@ describe('Cordova create and build', function () {
var buildDirectory = path.join(__dirname, '../..');
var appPackagesFolder = path.join(buildDirectory, projectFolder, 'AppPackages');
var buildScriptPath = '"' + path.join(buildDirectory, projectFolder, 'cordova', 'build') + '"';
- var silent = true;
+ var silent = false;
+
function verifySubDirContainsFile (subDirName, fileName, count) {
count = typeof count !== 'undefined' ? count : 1;
@@ -200,7 +201,7 @@ describe('Cordova create and build', function () {
// --release --bundle
- it('spec.6a should generate appxupload and appxbundle for Windows 10 project bundle release build', function () {
+ fit('spec.6a should generate appxupload and appxbundle for Windows 10 project bundle release build', function () {
shell.exec(buildScriptPath + ' --release --bundle --archs=\"x64 x86 arm\"', {silent: silent});
_expectExist(/.*bundle\.appxupload$/, 3);
_expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_Test', 'CordovaApp.Windows10_1.0.0.0_x64_x86_arm.appxbundle');
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 15/16: move 6a down so more tests run
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit 40590bdd510d7467bc64eb67c635b96fe5849c59
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Fri Jan 26 00:03:54 2018 +0100
move 6a down so more tests run
---
spec/e2e/endtoend.spec.js | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/spec/e2e/endtoend.spec.js b/spec/e2e/endtoend.spec.js
index 15ff8a0..0cd3203 100644
--- a/spec/e2e/endtoend.spec.js
+++ b/spec/e2e/endtoend.spec.js
@@ -201,11 +201,7 @@ describe('Cordova create and build', function () {
// --release --bundle
- fit('spec.6a should generate appxupload and appxbundle for Windows 10 project bundle release build', function () {
- shell.exec(buildScriptPath + ' --release --bundle --archs=\"x64 x86 arm\"', {silent: silent});
- _expectExist(/.*bundle\.appxupload$/, 3);
- _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_Test', 'CordovaApp.Windows10_1.0.0.0_x64_x86_arm.appxbundle');
- });
+ // here be 6a
it('spec.6b should generate appxupload and appxbundle for Windows 10 project bundle release build', function () {
shell.exec(buildScriptPath + ' --release --appx=8.1-phone --bundle --archs=\"x64 x86 arm\"', {silent: silent});
@@ -232,4 +228,10 @@ describe('Cordova create and build', function () {
_expectSubdirAndFileExist('CordovaApp.Phone_1.0.0.0_arm_Test', 'CordovaApp.Phone_1.0.0.0_arm.appx');
_expectSubdirAndFileExist('CordovaApp.Phone_1.0.0.0_x86_Test', 'CordovaApp.Phone_1.0.0.0_x86.appx');
});
+
+ it('spec.6a should generate appxupload and appxbundle for Windows 10 project bundle release build', function () {
+ shell.exec(buildScriptPath + ' --release --bundle --archs=\"x64 x86 arm\"', {silent: silent});
+ _expectExist(/.*bundle\.appxupload$/, 3);
+ _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_Test', 'CordovaApp.Windows10_1.0.0.0_x64_x86_arm.appxbundle');
+ });
});
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 04/16: extrat file and subdir+file expect code
into function
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit 92c48ca2fa15b501a7cf7bbf67fea4c133df0a4d
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Jan 25 16:52:09 2018 +0100
extrat file and subdir+file expect code into function
---
spec/e2e/endtoend.spec.js | 33 ++++++++++++++++++++++-----------
1 file changed, 22 insertions(+), 11 deletions(-)
diff --git a/spec/e2e/endtoend.spec.js b/spec/e2e/endtoend.spec.js
index 1f803a1..f4b8bd0 100644
--- a/spec/e2e/endtoend.spec.js
+++ b/spec/e2e/endtoend.spec.js
@@ -42,6 +42,17 @@ describe('Cordova create and build', function () {
expect(packages.filter(function (file) { return file.match(fileName); }).length).toBe(1);
}
+ function _expectExist(fileNamePattern) {
+ var packages = shell.ls(appPackagesFolder);
+ expect(packages.filter(function (file) { return file.match(fileNamePattern); }).length).toBe(1);
+ }
+
+ function _expectSubdirAndFileExist(subDirName, fileName) {
+ var packages = shell.ls(appPackagesFolder);
+ _expectExist(subDirName);
+ verifySubDirContainsFile(subDirName, fileName);
+ }
+
beforeEach(function () {
shell.exec(path.join('bin', 'create') + ' "' + projectFolder + '" com.test.app 応用', {silent: silent});
});
@@ -55,28 +66,28 @@ describe('Cordova create and build', function () {
expect(fs.existsSync(projectFolder)).toBe(true);
});
- // default build
+ // default
- it('spec.2a should build default (win10) project', function () {
+ it('spec.2 should build default (win10) project', function () {
shell.exec(buildScriptPath + '', {silent: silent});
- var packages = shell.ls(appPackagesFolder);
- var subDir = 'CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test';
- expect(packages.filter(function (file) { return file.match(subDir); }).length).toBe(1);
- verifySubDirContainsFile(subDir, 'CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx');
+ _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test', 'CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx');
});
- // --appx 8.1
+ // --appx
+
+ it('spec.2a should build win10 project', function () {
+ shell.exec(buildScriptPath + ' --appx=uap', {silent: silent});
+ _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test', 'CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx');
+ });
it('spec.2b should build 8.1 win project', function () {
shell.exec(buildScriptPath + ' --appx=8.1-win', {silent: silent});
- var packages = shell.ls(appPackagesFolder);
- expect(packages.filter(function (file) { return file.match(/.*Windows.*\.appxupload/); }).length).toBe(1);
+ _expectExist(/.*Windows.*\.appxupload/);
});
it('spec.2c should build 8.1 phone project', function () {
shell.exec(buildScriptPath + ' --appx=8.1-phone', {silent: silent});
- var packages = shell.ls(appPackagesFolder);
- expect(packages.filter(function (file) { return file.match(/.*Phone.*\.appxupload*/); }).length).toBe(1);
+ _expectExist(/.*Phone.*\.appxupload/);
});
// --archs
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 06/16: add test for new override
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit 8c18f6a5fcdc8104b973f1109bfdc6b0e1514539
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Jan 25 17:05:01 2018 +0100
add test for new override
---
spec/e2e/endtoend.spec.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/spec/e2e/endtoend.spec.js b/spec/e2e/endtoend.spec.js
index f4b8bd0..49484ea 100644
--- a/spec/e2e/endtoend.spec.js
+++ b/spec/e2e/endtoend.spec.js
@@ -90,6 +90,12 @@ describe('Cordova create and build', function () {
_expectExist(/.*Phone.*\.appxupload/);
});
+ it('spec.2c should build 8.1 win + phone project', function () {
+ shell.exec(buildScriptPath + ' --appx=8.1', {silent: silent});
+ _expectExist(/.*Windows.*\.appxupload/);
+ _expectExist(/.*Phone.*\.appxupload/);
+ });
+
// --archs
it('spec.3 should build project for particular CPU', function () {
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 07/16: remove duplicated getBuildTargets (and
update its internal usage)
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit 37ddb86954f1014045ee60aaa3f92045031fb345
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Jan 25 19:01:55 2018 +0100
remove duplicated getBuildTargets (and update its internal usage)
---
template/cordova/lib/build.js | 150 +++++++++++++-----------------------------
1 file changed, 45 insertions(+), 105 deletions(-)
diff --git a/template/cordova/lib/build.js b/template/cordova/lib/build.js
index 2f3ef8d..e4c6113 100644
--- a/template/cordova/lib/build.js
+++ b/template/cordova/lib/build.js
@@ -76,24 +76,8 @@ module.exports.run = function run (buildOptions) {
};
// returns list of projects to be built based on config.xml and additional parameters (-appx)
-module.exports.getBuildTargets = function (isWinSwitch, isPhoneSwitch, projOverride) {
+function getBuildTargets (isWinSwitch, isPhoneSwitch, projOverride, buildConfig = null) {
- // apply build target override if one was specified
- if (projOverride) {
- switch (projOverride.toLowerCase()) {
- case '8.1':
- return [projFiles.win, projFiles.phone];
- case '8.1-phone':
- return [projFiles.phone];
- case '8.1-win':
- return [projFiles.win];
- case 'uap':
- return [projFiles.win10];
- default:
- events.emit('warn', 'Ignoring unrecognized --appx parameter passed to build: "' + projOverride + '"');
- break;
- }
- }
var configXML = new ConfigParser(path.join(ROOT, 'config.xml'));
var targets = [];
@@ -139,8 +123,50 @@ module.exports.getBuildTargets = function (isWinSwitch, isPhoneSwitch, projOverr
}
}
+ // apply build target override if one was specified
+ if (projOverride) {
+ switch (projOverride.toLowerCase()) {
+ case '8.1':
+ targets = [projFiles.win, projFiles.phone];
+ break;
+ case '8.1-phone':
+ targets = [projFiles.phone];
+ break;
+ case '8.1-win':
+ targets = [projFiles.win];
+ break;
+ case 'uap':
+ targets = [projFiles.win10];
+ break;
+ default:
+ events.emit('warn', 'Ignoring unrecognized --appx parameter passed to build: "' + projOverride + '"');
+ break;
+ }
+ }
+
+ if(buildConfig !== null) {
+ // As part of reworking how build and package determine the winning project, set the 'target type' project
+ // as part of build configuration. This will be used for determining the binary to 'run' after build is done.
+ if (targets.length > 0) {
+ switch (targets[0]) {
+ case projFiles.phone:
+ buildConfig.targetProject = 'phone';
+ break;
+ case projFiles.win10:
+ buildConfig.targetProject = 'windows10';
+ break;
+ case projFiles.win:
+ /* falls through */
+ default:
+ buildConfig.targetProject = 'windows';
+ break;
+ }
+ }
+ }
+
return targets;
};
+module.exports.getBuildTargets = getBuildTargets;
/**
* Parses and validates buildOptions object and platform-specific CLI arguments,
@@ -278,7 +304,7 @@ function parseBuildConfig (buildConfigPath, buildType) {
function updateManifestWithPublisher (allMsBuildVersions, config) {
if (!config.publisherId) return;
- var selectedBuildTargets = getBuildTargets(config);
+ var selectedBuildTargets = getBuildTargets(config.win, config.phone, config.projVerOverride, config);
var msbuild = getLatestMSBuild(allMsBuildVersions);
var myBuildTargets = filterSupportedTargets(selectedBuildTargets, msbuild);
var manifestFiles = myBuildTargets.map(function (proj) {
@@ -293,7 +319,7 @@ function updateManifestWithPublisher (allMsBuildVersions, config) {
function buildTargets (allMsBuildVersions, config) {
// filter targets to make sure they are supported on this development machine
- var selectedBuildTargets = getBuildTargets(config);
+ var selectedBuildTargets = getBuildTargets(config.win, config.phone, config.projVerOverride, config);
var msbuild = getLatestMSBuild(allMsBuildVersions);
if (!msbuild) {
return Q.reject(new CordovaError('No valid MSBuild was detected for the selected target.'));
@@ -411,92 +437,6 @@ function clearIntermediatesAndGetPackage (bundleTerms, config, hasAnyCpu) {
return pckage.getPackageFileInfo(finalFile);
}
-// Can update buildConfig in the following ways:
-// * Sets targetProject property, the project to launch when complete
-function getBuildTargets (buildConfig) {
- var configXML = new ConfigParser(path.join(ROOT, 'config.xml'));
- var targets = [];
- var noSwitches = !(buildConfig.phone || buildConfig.win);
-
- // Windows
- if (buildConfig.win || noSwitches) { // if --win or no arg
- var windowsTargetVersion = configXML.getWindowsTargetVersion();
- switch (windowsTargetVersion) {
- case '8':
- case '8.0':
- throw new CordovaError('windows8 platform is deprecated. To use windows-target-version=8.0 you must downgrade to cordova-windows@4.');
- case '8.1':
- targets.push(projFiles.win);
- break;
- case '10.0':
- case 'UAP':
- targets.push(projFiles.win10);
- break;
- default:
- throw new Error('Unsupported windows-target-version value: ' + windowsTargetVersion);
- }
- }
-
- // Windows Phone
- if (buildConfig.phone || noSwitches) { // if --phone or no arg
- var windowsPhoneTargetVersion = configXML.getWindowsPhoneTargetVersion();
- switch (windowsPhoneTargetVersion) {
- case '8.1':
- targets.push(projFiles.phone);
- break;
- case '10.0':
- case 'UAP':
- if (!buildConfig.win && !noSwitches) {
- // Already built due to --win or no switches
- // and since the same thing can be run on Phone as Windows,
- // we can skip this one.
- targets.push(projFiles.win10);
- }
- break;
- default:
- throw new Error('Unsupported windows-phone-target-version value: ' + windowsPhoneTargetVersion);
- }
- }
-
- // apply build target override if one was specified
- if (buildConfig.projVerOverride) {
- switch (buildConfig.projVerOverride) {
- case '8.1-phone':
- targets = [projFiles.phone];
- break;
- case '8.1-win':
- targets = [projFiles.win];
- break;
- case 'uap':
- targets = [projFiles.win10];
- break;
- default:
- events.emit('warn', 'Ignoring unrecognized --appx parameter passed to build: "' + buildConfig.projVerOverride + '"');
- break;
- }
- }
-
- // As part of reworking how build and package determine the winning project, set the 'target type' project
- // as part of build configuration. This will be used for determining the binary to 'run' after build is done.
- if (targets.length > 0) {
- switch (targets[0]) {
- case projFiles.phone:
- buildConfig.targetProject = 'phone';
- break;
- case projFiles.win10:
- buildConfig.targetProject = 'windows10';
- break;
- case projFiles.win:
- /* falls through */
- default:
- buildConfig.targetProject = 'windows';
- break;
- }
- }
-
- return targets;
-}
-
function getLatestMSBuild (allMsBuildVersions) {
var availableVersions = allMsBuildVersions
.filter(function (buildTools) {
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 13/16: remove duplicated test and re-number tests
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit a11ce1de74bafe81cdf669a0ec6a9a2576e7be70
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Jan 25 23:10:28 2018 +0100
remove duplicated test and re-number tests
---
spec/e2e/endtoend.spec.js | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/spec/e2e/endtoend.spec.js b/spec/e2e/endtoend.spec.js
index 8a012a5..17de259 100644
--- a/spec/e2e/endtoend.spec.js
+++ b/spec/e2e/endtoend.spec.js
@@ -79,7 +79,7 @@ describe('Cordova create and build', function () {
// --appx
- it('spec.2a should build win10 project', function () {
+ it('spec.2a should build uap/win10 project', function () {
shell.exec(buildScriptPath + ' --appx=uap', {silent: silent});
_expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test', 'CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx');
});
@@ -107,18 +107,18 @@ describe('Cordova create and build', function () {
_expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_x64_debug_Test', 'CordovaApp.Windows10_1.0.0.0_x64_debug.appx');
});
- it('spec.3b should build project for particular CPU', function () {
+ it('spec.3b should build project (8.1) for particular CPU', function () {
shell.exec(buildScriptPath + ' --appx=8.1 --archs=\"x64\"', {silent: silent}); /* eslint no-useless-escape : 0 */
_expectExist(/.*Phone.*x64.*\.appxupload/);
_expectExist(/.*Windows.*x64.*\.appxupload/);
});
- it('spec.3c should build project for particular CPU', function () {
+ it('spec.3c should build project (8.1-win) for particular CPU', function () {
shell.exec(buildScriptPath + ' --appx=8.1-win --archs=\"x64\"', {silent: silent}); /* eslint no-useless-escape : 0 */
_expectExist(/.*Windows.*x64.*\.appxupload/);
});
- it('spec.3d should build project for particular CPU', function () {
+ it('spec.3d should build project (8.1-phone) for particular CPU', function () {
shell.exec(buildScriptPath + ' --appx=8.1-phone --archs=\"x64\"', {silent: silent}); /* eslint no-useless-escape : 0 */
_expectExist(/.*Phone.*x64.*\.appxupload/);
});
@@ -131,7 +131,7 @@ describe('Cordova create and build', function () {
_expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test', 'CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx');
});
- it('spec.4b should build project for CPUs separated by whitespaces', function () {
+ it('spec.4b should build project (8.1) for CPUs separated by whitespaces', function () {
shell.exec(buildScriptPath + ' --appx=8.1 --archs=\"x64 x86 arm anycpu\"', {silent: silent}); /* eslint no-useless-escape : 0 */
_expectExist(/.*Phone.*x86.*\.appxupload/);
_expectExist(/.*Phone.*x64.*\.appxupload/);
@@ -200,13 +200,13 @@ describe('Cordova create and build', function () {
// --release --bundle
- it('spec.6 should generate appxupload and appxbundle for Windows 10 project bundle release build', function () {
+ it('spec.6a should generate appxupload and appxbundle for Windows 10 project bundle release build', function () {
shell.exec(buildScriptPath + ' --release --bundle --archs=\"x64 x86 arm\"', {silent: silent});
_expectExist(/.*bundle\.appxupload$/, 3);
_expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_Test', 'CordovaApp.Windows10_1.0.0.0_x64_x86_arm.appxbundle');
});
- it('spec.7 should generate appxupload and appxbundle for Windows 10 project bundle release build', function () {
+ it('spec.6b should generate appxupload and appxbundle for Windows 10 project bundle release build', function () {
shell.exec(buildScriptPath + ' --release --appx=8.1-phone --bundle --archs=\"x64 x86 arm\"', {silent: silent});
_expectExist(/.*bundle\.appxupload$/, 3);
_expectSubdirAndFileExist('CordovaApp.Phone_1.0.0.0_Test', 'CordovaApp.Phone_1.0.0.0_x64_x86_arm.appxbundle');
@@ -214,13 +214,7 @@ describe('Cordova create and build', function () {
// --release (non-bundle)
- it('spec.8 should generate appxupload for Windows 10 project non-bundle release build', function () {
- shell.exec(buildScriptPath + ' --release --win --archs=\"x64 x86 arm\"', {silent: silent});
- _expectExist(/.*\.appxupload$/, 3);
-
- });
-
- it('spec.9a should generate appxupload for Windows 10 project non-bundle release build', function () {
+ it('spec.7 should generate appxupload for Windows 10 project non-bundle release build', function () {
shell.exec(buildScriptPath + ' --release --archs=\"x64 x86 arm\"', {silent: silent});
_expectExist(/.*\.appxupload$/, 3);
// CB-12416 Should build appx in separate dirs for each architecture
@@ -231,7 +225,7 @@ describe('Cordova create and build', function () {
_expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_x86_Test', 'CordovaApp.Windows10_1.0.0.0_x86.appx');
});
- it('spec.9b for a non-bundle case for Windows Phone 8.1 it should build appx in separate dirs for each architecture', function () {
+ it('spec.8 for a non-bundle case for Windows Phone 8.1 it should build appx in separate dirs for each architecture', function () {
shell.exec(buildScriptPath + ' --release --appx=8.1-phone --phone --archs=\"x86 arm\"', {silent: silent});
_expectExist(/.*\.appxupload$/, 2);
_expectSubdirAndFileExist('CordovaApp.Phone_1.0.0.0_arm_Test', 'CordovaApp.Phone_1.0.0.0_arm.appx');
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[cordova-windows] 03/16: document/structure current state of tests
(although some are still failing)
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-CB-13829
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit 28a48b4f717045025c701a222a0d31b3a51aaec0
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Jan 25 16:14:29 2018 +0100
document/structure current state of tests (although some are still failing)
---
spec/e2e/endtoend.spec.js | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/spec/e2e/endtoend.spec.js b/spec/e2e/endtoend.spec.js
index 4facaca..1f803a1 100644
--- a/spec/e2e/endtoend.spec.js
+++ b/spec/e2e/endtoend.spec.js
@@ -55,6 +55,8 @@ describe('Cordova create and build', function () {
expect(fs.existsSync(projectFolder)).toBe(true);
});
+ // default build
+
it('spec.2a should build default (win10) project', function () {
shell.exec(buildScriptPath + '', {silent: silent});
var packages = shell.ls(appPackagesFolder);
@@ -63,6 +65,8 @@ describe('Cordova create and build', function () {
verifySubDirContainsFile(subDir, 'CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx');
});
+ // --appx 8.1
+
it('spec.2b should build 8.1 win project', function () {
shell.exec(buildScriptPath + ' --appx=8.1-win', {silent: silent});
var packages = shell.ls(appPackagesFolder);
@@ -75,6 +79,8 @@ describe('Cordova create and build', function () {
expect(packages.filter(function (file) { return file.match(/.*Phone.*\.appxupload*/); }).length).toBe(1);
});
+ // --archs
+
it('spec.3 should build project for particular CPU', function () {
shell.exec(buildScriptPath + ' --archs=\"x64\"', {silent: silent}); /* eslint no-useless-escape : 0 */
var packages = shell.ls(appPackagesFolder);
@@ -95,6 +101,8 @@ describe('Cordova create and build', function () {
expect(packages.filter(function (file) { return file.match(/.*Windows.*anycpu.*\.appx.*/i); }).length).toBe(1);
});
+ // "InProcessServer extension"
+
it('spec.5 should build project containing plugin with InProcessServer extension', function (done) {
var extensionsPluginInfo, api;
@@ -123,6 +131,8 @@ describe('Cordova create and build', function () {
});
});
+ // --release 8.1
+
it('spec.6 should generate appxupload and appxbundle for Windows 8.1 project bundle release build', function () {
shell.exec(buildScriptPath + ' --release --win --bundle --archs=\"x64 x86 arm\"', {silent: silent});
var packages = shell.ls(appPackagesFolder);
@@ -140,6 +150,8 @@ describe('Cordova create and build', function () {
expect(packages.filter(function (file) { return file.match(/.*\.appxupload$/); }).length).toBe(3);
});
+ // --release 10
+
it('spec.7 should generate appxupload and appxbundle for Windows 10 project bundle release build', function () {
shell.exec(buildScriptPath + ' --release --win --appx=uap --bundle --archs=\"x64 x86 arm\"', {silent: silent});
var packages = shell.ls(appPackagesFolder);
@@ -172,6 +184,8 @@ describe('Cordova create and build', function () {
verifySubDirContainsFile(x86SubDir, 'CordovaApp.Windows10_1.0.0.0_x86.appx');
});
+ // --release 8.1
+
it('spec.8 for a non-bundle case for Windows Phone 8.1 it should build appx in separate dirs for each architecture', function () {
shell.exec(buildScriptPath + ' --release --phone --archs=\"x86 arm\"', {silent: silent});
var packages = shell.ls(appPackagesFolder);
--
To stop receiving notification emails like this one, please contact
janpio@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org