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/15 12:00:47 UTC
[cordova-windows] branch janpio-msbuild_cleanup updated: avoid
crosspolution in tests that rely on ENV vars (uh, ugly)
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-msbuild_cleanup
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
The following commit(s) were added to refs/heads/janpio-msbuild_cleanup by this push:
new a4ad1a9 avoid crosspolution in tests that rely on ENV vars (uh, ugly)
a4ad1a9 is described below
commit a4ad1a9bf06adbd1e86db7957a65874bda1b90e5
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Thu Feb 15 13:00:38 2018 +0100
avoid crosspolution in tests that rely on ENV vars (uh, ugly)
---
spec/unit/build.spec.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/spec/unit/build.spec.js b/spec/unit/build.spec.js
index ad25c99..f9f55fa 100644
--- a/spec/unit/build.spec.js
+++ b/spec/unit/build.spec.js
@@ -376,6 +376,9 @@ describe('run method', function () {
var msBuildBinPath = path.join(customMSBuildPath, 'MSBuild/15.0/Bin');
var customMSBuildVersion = '15.0';
process.env.VSINSTALLDIR = customMSBuildPath;
+ // avoid crosspollution with MSBUILDDIR
+ var backupMSBUILDDIR = process.env.MSBUILDDIR;
+ delete process.env.MSBUILDDIR;
spyOn(MSBuildTools, 'getMSBuildToolsAt')
.and.returnValue(Q({
@@ -392,6 +395,7 @@ describe('run method', function () {
expect(fail).not.toHaveBeenCalled();
expect(MSBuildTools.getMSBuildToolsAt).toHaveBeenCalledWith(msBuildBinPath);
delete process.env.VSINSTALLDIR;
+ process.env.MSBUILDDIR = backupMSBUILDDIR;
done();
});
});
@@ -400,6 +404,9 @@ describe('run method', function () {
var msBuildBinPath = path.join('/some/path', 'MSBuild/15.0/Bin');
var customMSBuildVersion = '15.0';
process.env.MSBUILDDIR = msBuildBinPath;
+ // avoid crosspollution with VSINSTALLDIR
+ var backupVSINSTALLDIR = process.env.VSINSTALLDIR;
+ delete process.env.VSINSTALLDIR;
spyOn(MSBuildTools, 'getMSBuildToolsAt')
.and.returnValue(Q({
@@ -416,6 +423,7 @@ describe('run method', function () {
expect(fail).not.toHaveBeenCalled();
expect(MSBuildTools.getMSBuildToolsAt).toHaveBeenCalledWith(msBuildBinPath);
delete process.env.MSBUILDDIR;
+ process.env.VSINSTALLDIR = backupVSINSTALLDIR;
done();
});
});
--
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