Skip to content

Commit

Permalink
Debug tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanharris committed Jul 13, 2017
1 parent 6755761 commit bffa01b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
library 'pipeline-library'

timestamps {
node('windows && windows-sdk-10 && windows-sdk-8.1 && (vs2015 || vs2017) && npm-publish') {
node('windows && windows-sdk-10 && windows-sdk-8.1 && (vs2015 || vs2017) && npm-publish && WinGin-03') {
def packageVersion = ''
def isPR = false
stage('Checkout') {
Expand Down
3 changes: 1 addition & 2 deletions bin/wp_get_appx_metadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ $manifest = @{ "Name" = "AppxManifest.xml" }
$manifest.Path = Join-Path $directory $manifest.Name
$manifest.File = $shell.NameSpace($zipFilePath).Items() | ? { $_.Name -eq $manifest.Name }
$shell.Namespace($directory).CopyHere($manifest.File)
Test-Path $manifest.Path
$manifest.Xml = [xml](get-content $manifest.Path)

Remove-Item $zipFilePath
Remove-Item $manifest.Path

$var=@($manifest.Xml.Package.Identity.Name,$manifest.Xml.Package.PhoneIdentity.PhoneProductId)[![String]::IsNullOrEmpty($manifest.Xml.Package.PhoneIdentity.PhoneProductId)]
$var
9 changes: 8 additions & 1 deletion lib/wptool.js
Original file line number Diff line number Diff line change
Expand Up @@ -1043,13 +1043,20 @@ function getProductGUID(appxFile, options, callback) {
if (err) {
return callback(err);
}

console.log(script);
appc.subprocess.run(options.powershell || 'powershell', [
'-ExecutionPolicy', 'Bypass', '-NoLogo', '-NonInteractive', '-NoProfile',
'-File',
script,
appxFile
], function (code, out, err) {
console.log('code ', code);
console.log('out ', out);
console.log('err ', err);
var loc = path.join(path.dirname(appxFile), 'AppxManifest.xml');
console.log(fs.existsSync(loc))
var zipLoc = appxFile+'.zip';
console.log(fs.existsSync(zipLoc));
if (code) {
var ex = new Error(__('Failed to detect product id of appx: %s', out));
return callback(ex);
Expand Down
8 changes: 3 additions & 5 deletions test/test-emulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ describe('emulator', function () {
// });
});

[WIN_8, WIN_8_1, WIN_10].forEach(function (wpsdk) {
[WIN_10].forEach(function (wpsdk) {
// suite
(process.platform === 'win32' ? describe : describe.skip)(wpsdk + ' emulator launching', function () {
(process.platform === 'win32' ? describe.only : describe.skip)(wpsdk + ' emulator launching', function () {
var emu;

// Grab the emulator
Expand All @@ -133,10 +133,8 @@ describe('emulator', function () {

windowslib.emulator.detect(function (err, results) {
if (err) {
console.error(err);
return done(err);
}

if (results.emulators[wpsdk].length > 0) {
emu = results.emulators[wpsdk][0];
}
Expand Down Expand Up @@ -195,7 +193,7 @@ describe('emulator', function () {
// We launch the emulator, but don't wait for it to be fully up before attempting to install the app.
// We should likely add some check that after we do wptool.connect we wait for the status to change to 'Running' from 'Starting'
// Add a specific test for this?
it('launch emulator and install app via #install (from shut down emulator), then shutdown emulator', function (done) {
it.only('launch emulator and install app via #install (from shut down emulator), then shutdown emulator', function (done) {
this.timeout(240000);
this.slow(110000);

Expand Down

0 comments on commit bffa01b

Please sign in to comment.