New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use `cross-spawn` for robust, platform-independent spawning #50

Closed
wants to merge 2 commits into
base: master
from

Conversation

@raphinesse
Copy link
Contributor

raphinesse commented Sep 16, 2018

What does this PR do?

This PR removes any special treatment of Windows from superspawn and instead delegates this work to cross-spawn. The interface of superspawn is not changed. The goal behind this change is to reduce maintenance and improve cross-platform operability.

This PR depends on apache/cordova-lib#622 (thanks @AlmirKadric) and closes apache/cordova-lib#688.

What testing has been done on this change?

  • Existing test suite passes
  • New, very basic test for escaping on Windows passes
  • All test suites of all Apache Cordova packages depending on cordova-common pass
    • Tests pass on Linux (Travis CI run for tooling and cordova-browser)
      • cordova-cli tests pass
      • cordova-plugman tests pass
      • cordova-create tests pass
      • cordova-fetch tests pass
      • cordova-lib tests pass
      • cordova-browser tests pass
      • cordova-android tests pass
      • cordova-ios tests pass
      • cordova-osx tests pass
      • cordova-windows tests pass
    • Tests pass on Windows (AppVeyor run for tooling and cordova-browser)
      • cordova-cli tests pass
      • cordova-plugman tests pass
      • cordova-create tests pass
      • cordova-fetch tests pass
      • cordova-lib tests pass
      • cordova-browser tests pass
      • cordova-android tests pass
      • cordova-ios tests pass
      • cordova-osx tests pass
      • cordova-windows tests pass
    • Tests pass on macOS (Travis CI run for tooling and cordova-browser)
      • cordova-cli tests pass
      • cordova-plugman tests pass
      • cordova-create tests pass
      • cordova-fetch tests pass
      • cordova-lib tests pass
      • cordova-browser tests pass
      • cordova-android tests pass
      • cordova-ios tests pass
      • cordova-osx tests pass
      • cordova-windows tests pass

As you might have noticed, I still need some help to tick off all those boxes. Especially for all platforms that require an SDK to be set-up. So I'd like to ask anyone who has one of the missing combinations at hand: please check out the test repository I prepared, follow the instructions in the README and share your results here. Running the tests is easy as pie, I promise 馃槃.

Please run as much of the tests as you can, even if some of the boxes are already ticked off. This is especially true if you are on Windows and even more so if you are affected by the original issue (CB-14166). As we have seen during the excellent debugging of this issue (thanks @knight9999 and @janpio), tiny differences in your setup can make a big difference in the end result. So it's important to get as much coverage as possible here.

Special thanks to @oliversalzburg for mentioning his handy tool spodr to me in raphinesse#1. It made building the above test suite way easier. Check it out if you want to easily setup and manage a bunch of linked npm packages (like Cordova tooling) without having to go full-mono-repo as is required by other tools like lerna.

Finally, the commit that is prefixed with TMP is a temporary work-around for a weird issue that I encountered locally (#49). I have no idea what's happening there, but it has absolutely nothing to do with this change. So I took it out of the equation, so please ignore for now.

@raphinesse raphinesse self-assigned this Sep 16, 2018

@raphinesse raphinesse added this to 馃悾 New PR / Untriaged in Apache Cordova: Platform Pull Requests via automation Sep 16, 2018

if (/^[^"].*[ &].*[^"]/.test(a)) return '"' + a + '"';
return a;
}

/**
* A special implementation for child_process.spawn that handles

This comment has been minimized.

@janpio

janpio Sep 16, 2018

could update that line now as well as child_process.spawn is not used any more directly

This comment has been minimized.

@raphinesse

raphinesse Sep 16, 2018

Contributor

IMHO, the wording is a bit unfortunate to begin with. Do you have a suggestion on how to improve it?

This comment has been minimized.

@janpio

janpio Sep 16, 2018

Wrapper for crossSpawn.spawn that makes sure cmd is executable.

I don't really understand what else it does tbh.

This comment has been minimized.

@raphinesse

raphinesse Sep 16, 2018

Contributor

Frankly, I would not even mention cross-spawn. I'ts an implementation detail. So maybe we should just change The beginning to

A child_process.spawn-compatible function that handles ...

Anyway, I think that's the least important part of this change 馃槄

This comment has been minimized.

@janpio

janpio Sep 16, 2018

It was the only one I could comment on without actually doing any work :D

This comment has been minimized.

@raphinesse

raphinesse Sep 16, 2018

Contributor

馃ぃ

@brodybits

This comment was marked as off-topic.

Copy link
Contributor

brodybits commented Sep 17, 2018

@raphinesse I think that apache/cordova-lib#622 should be reopened and merged once this one is merged. apache/cordova-lib#622 gets rid of Windows-specific special character handling, which I would think is correct if cross-spawn really does what it should do. Or am I mistaken somehow?

(The description says "This PR depends on apache/cordova-lib#622 (thanks @AlmirKadric)" but apache/cordova-lib#622 is closed, which I find a bit confusing.)

@raphinesse

This comment was marked as off-topic.

Copy link
Contributor

raphinesse commented Sep 17, 2018

@brodybits Yes, this PR depends on apache/cordova-lib#622 which existed before it and had previously been closed since it did not actually solve the problem by itself. If we merge this, we also need apache/cordova-lib#622.

@dpogue

This comment has been minimized.

Copy link
Member

dpogue commented Sep 17, 2018

I'm getting failures in the cordova-android, cordova-ios, and cordova-osx tests that I suspect are related to those tests not being updated to account for fs-extra in cordova-common and cordova-lib. I'm getting other random-seeming failures too:

cordova-common results
Command failed: npm test
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cordova-common@3.0.0-dev jasmine: `jasmine JASMINE_CONFIG_PATH=spec/support/jasmine.json`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the cordova-common@3.0.0-dev jasmine script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/dpogue/.npm/_logs/2018-09-17T22_03_00_191Z-debug.log
npm ERR! Test failed.  See above for more details.


> cordova-common@3.0.0-dev test /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common
> npm run eslint && npm run jasmine


> cordova-common@3.0.0-dev eslint /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common
> eslint src spec


> cordova-common@3.0.0-dev jasmine /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common
> jasmine JASMINE_CONFIG_PATH=spec/support/jasmine.json

Started
..F.....FF.FFFFFF.....................FF............................................................................................................................................................*.......*............................................

Failures:
1) config-changes module queue methods addInstalledPluginToPrepareQueue Test 001 : should append specified plugin to platform.json
  Message:
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Images.xcassets'
  Stack:
    error properties: Object({ errno: -66, syscall: 'rmdir', code: 'ENOTEMPTY', path: '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Images.xcassets' })
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Images.xcassets'
        at Object.rmdirSync (fs.js:677:3)
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:304:27)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at rimrafSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at options.readdirSync.forEach.f (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:39)
        at <Jasmine>
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:26)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at rimrafSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at options.readdirSync.forEach.f (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:39)

2) config-changes module generate_plugin_config_munge method for android projects Test 007 : should return a flat config hierarchy for simple, one-off config changes
  Message:
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp'
  Stack:
    error properties: Object({ errno: -66, syscall: 'rmdir', code: 'ENOTEMPTY', path: '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp' })
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp'
        at Object.rmdirSync (fs.js:677:3)
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:304:27)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at rimrafSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at options.readdirSync.forEach.f (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:39)
        at <Jasmine>
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:26)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at Object.rimrafSync [as removeSync] (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at UserContext.<anonymous> (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js:76:12)

3) config-changes module generate_plugin_config_munge method for android projects Test 008 : should split out multiple children of config-file elements into individual leaves
  Message:
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Images.xcassets'
  Stack:
    error properties: Object({ errno: -66, syscall: 'rmdir', code: 'ENOTEMPTY', path: '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Images.xcassets' })
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Images.xcassets'
        at Object.rmdirSync (fs.js:677:3)
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:304:27)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at rimrafSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at options.readdirSync.forEach.f (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:39)
        at <Jasmine>
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:26)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at rimrafSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at options.readdirSync.forEach.f (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:39)

4) config-changes module generate_plugin_config_munge method for android projects Test 010 : should increment config hierarchy leaves if different config-file elements target the same file + selector + xml
  Message:
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Images.xcassets/AppIcon.appiconset'
  Stack:
    error properties: Object({ errno: -66, syscall: 'rmdir', code: 'ENOTEMPTY', path: '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Images.xcassets/AppIcon.appiconset' })
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Images.xcassets/AppIcon.appiconset'
        at Object.rmdirSync (fs.js:677:3)
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:304:27)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at rimrafSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at options.readdirSync.forEach.f (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:39)
        at <Jasmine>
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:26)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at rimrafSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at options.readdirSync.forEach.f (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:39)

5) config-changes module generate_plugin_config_munge method for android projects Test 011 : should take into account interpolation variables
  Message:
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Images.xcassets/LaunchImage.launchimage'
  Stack:
    error properties: Object({ errno: -66, syscall: 'rmdir', code: 'ENOTEMPTY', path: '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Images.xcassets/LaunchImage.launchimage' })
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Images.xcassets/LaunchImage.launchimage'
        at Object.rmdirSync (fs.js:677:3)
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:304:27)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at rimrafSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at options.readdirSync.forEach.f (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:39)
        at <Jasmine>
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:26)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at rimrafSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at options.readdirSync.forEach.f (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:39)

6) config-changes module generate_plugin_config_munge method for android projects Test 012 : should create munges for platform-agnostic config.xml changes
  Message:
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp'
  Stack:
    error properties: Object({ errno: -66, syscall: 'rmdir', code: 'ENOTEMPTY', path: '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp' })
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp'
        at Object.rmdirSync (fs.js:677:3)
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:304:27)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at rimrafSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at options.readdirSync.forEach.f (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:39)
        at <Jasmine>
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:26)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at Object.rimrafSync [as removeSync] (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at UserContext.<anonymous> (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js:76:12)

7) config-changes module processing of plugins (via process method) Test 014 : should generate config munges for queued plugins
  Message:
    CordovaError: Cannot find plugin.xml for plugin "org.test.plugins.dummyplugin". Please try adding it again.
  Stack:
    error properties: undefined
        at <Jasmine>
        at new PluginInfo (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/PluginInfo/PluginInfo.js:368:15)
        at PluginInfoProvider.get (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/PluginInfo/PluginInfoProvider.js:35:32)
        at /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/ConfigChanges/ConfigChanges.js:507:50
        at <Jasmine>
        at PlatformMunger_process [as process] (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/ConfigChanges/ConfigChanges.js:506:45)
        at UserContext.<anonymous> (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js:213:20)
        at <Jasmine>
  Message:
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman'
  Stack:
    error properties: Object({ errno: -66, syscall: 'rmdir', code: 'ENOTEMPTY', path: '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman' })
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman'
        at Object.rmdirSync (fs.js:677:3)
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:304:27)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at Object.rimrafSync [as removeSync] (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at UserContext.<anonymous> (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js:76:12)
        at <Jasmine>

8) config-changes module processing of plugins (via process method) : installation of xml config files Test 015 : should call graftXML for every new config munge it introduces (every leaf in config munge that does not exist)
  Message:
    CordovaError: Cannot find plugin.xml for plugin "org.test.plugins.dummyplugin". Please try adding it again.
  Stack:
    error properties: undefined
        at <Jasmine>
        at new PluginInfo (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/PluginInfo/PluginInfo.js:368:15)
        at PluginInfoProvider.get (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/PluginInfo/PluginInfoProvider.js:35:32)
        at /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/ConfigChanges/ConfigChanges.js:507:50
        at <Jasmine>
        at PlatformMunger_process [as process] (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/ConfigChanges/ConfigChanges.js:506:45)
        at UserContext.<anonymous> (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js:228:28)
        at <Jasmine>
  Message:
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Classes'
  Stack:
    error properties: Object({ errno: -66, syscall: 'rmdir', code: 'ENOTEMPTY', path: '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Classes' })
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp/Classes'
        at Object.rmdirSync (fs.js:677:3)
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:304:27)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at rimrafSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at options.readdirSync.forEach.f (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:39)
        at <Jasmine>
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:26)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at rimrafSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at options.readdirSync.forEach.f (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:39)

9) config-changes module processing of plugins (via process method) : installation of xml config files Test 016 : should not call graftXML for a config munge that already exists from another plugin
  Message:
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp'
  Stack:
    error properties: Object({ errno: -66, syscall: 'rmdir', code: 'ENOTEMPTY', path: '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp' })
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/SampleApp'
        at Object.rmdirSync (fs.js:677:3)
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:304:27)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at rimrafSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at options.readdirSync.forEach.f (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:39)
        at <Jasmine>
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:291:26)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at Object.rimrafSync [as removeSync] (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at UserContext.<anonymous> (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js:76:12)

10) config-changes module processing of plugins (via process method) : installation Test 025 : should resolve wildcard config-file targets to the project, if applicable
  Message:
    Error: Does not appear to be an xcode project, no xcode project file in /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman
  Stack:
    Error: Does not appear to be an xcode project, no xcode project file in /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman
        at Function.getIOSProjectname (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/ConfigChanges/ConfigFile.js:249:15)
        at resolveConfigFilePath (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/ConfigChanges/ConfigFile.js:221:32)
        at ConfigFile_load [as load] (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/ConfigChanges/ConfigFile.js:62:36)
        at new ConfigFile (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/ConfigChanges/ConfigFile.js:53:10)
        at ConfigKeeper_get [as get] (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/ConfigChanges/ConfigKeeper.js:51:23)
        at PlatformMunger_apply_file_munge [as apply_file_munge] (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/ConfigChanges/ConfigChanges.js:78:50)
        at munge_helper (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/ConfigChanges/ConfigChanges.js:252:14)
        at PlatformMunger.add_plugin_changes (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/ConfigChanges/ConfigChanges.js:159:12)
        at /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/src/ConfigChanges/ConfigChanges.js:508:14
        at <Jasmine>
  Message:
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman'
  Stack:
    error properties: Object({ errno: -66, syscall: 'rmdir', code: 'ENOTEMPTY', path: '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman' })
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman'
        at Object.rmdirSync (fs.js:677:3)
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:304:27)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at Object.rimrafSync [as removeSync] (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at UserContext.<anonymous> (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js:76:12)
        at <Jasmine>

11) config-changes module processing of plugins (via process method) : installation Test 026 : should move successfully installed plugins from queue to installed plugins section, and include/retain vars if applicable
  Message:
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman'
  Stack:
    error properties: Object({ errno: -66, syscall: 'rmdir', code: 'ENOTEMPTY', path: '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman' })
    Error: ENOTEMPTY: directory not empty, rmdir '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman'
        at Object.rmdirSync (fs.js:677:3)
        at rmkidsSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:304:27)
        at rmdirSync (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:281:7)
        at Object.rimrafSync [as removeSync] (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/node_modules/fs-extra/lib/remove/rimraf.js:252:7)
        at UserContext.<anonymous> (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js:76:12)
        at <Jasmine>
Pending:

1) PluginManager class instance addPlugin method Test 003 : should reject if "plugin" parameter is not specified or not a PluginInfo instance
  Temporarily disabled with xit


2) spawn method operation on windows should escape arguments if `cmd` is not an *.exe
  test should only run on windows

249 specs, 11 failures, 2 pending specs
Finished in 4.043 seconds
249 specs, 11 failures
cordova-lib results
Command failed: npm test
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cordova-lib@9.0.0-dev e2e-tests: `jasmine JASMINE_CONFIG_PATH=integration-tests/jasmine.json`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the cordova-lib@9.0.0-dev e2e-tests script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/dpogue/.npm/_logs/2018-09-17T22_06_41_229Z-debug.log
npm ERR! Test failed.  See above for more details.


> cordova-lib@9.0.0-dev test /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-lib
> npm run eslint && npm run unit-tests && npm run e2e-tests


> cordova-lib@9.0.0-dev eslint /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-lib
> eslint .


> cordova-lib@9.0.0-dev unit-tests /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-lib
> jasmine JASMINE_CONFIG_PATH=spec/jasmine.json

Started
.......................................*............................................................*.............................................*.................................................................................****....................................................................

Pending:

1) cordova/platform/addHelper happy path (success conditions) after platform api invocation when the restoring option is not provided should invoke preparePlatforms twice (?!?), once before installPluginsForNewPlatforms and once after... ?!
  Temporarily disabled with xit


2) cordova/plugin/add main method happy path should invoke preparePlatforms if plugman.install returned a falsey value
  Temporarily disabled with xit


3) cordova/plugin/list should warn if plugin list contains a plugin dependency that does not have a version satisfied
  Temporarily disabled with xit


4) serve command Test 001 : should not run outside of a Cordova-based project
  No reason given


5) serve command `serve` should fall back to assets/www on Android
  Temporarily disabled with xit


6) serve command `serve` should fall back to www on BlackBerry10
  Temporarily disabled with xit


7) serve command `serve` should fall back to www on iOS
  Temporarily disabled with xit

300 specs, 0 failures, 7 pending specs
Finished in 5.496 seconds

> cordova-lib@9.0.0-dev e2e-tests /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-lib
> jasmine JASMINE_CONFIG_PATH=integration-tests/jasmine.json

Started
.............*....................F....Subproject Path: CordovaLib
Subproject Path: app
..........cp: no such file or directory: /private/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/cordova-lib-cordova-platform-e2e-test-xy9qNF/project/node_modules/cordova-platform-test/node_modules

test-platform:Api:prepare
test-platform:Api:getPlatformInfo
test-platform:Api:prepare
test-platform:Api:getPlatformInfo
....................................*..........F............

Failures:
1) pkgJson plugin end-to-end Test#025 : if you add a platform/plugin with local path, pkg.json gets updated
  Message:
    CordovaError: Error: npm: Command failed with exit code 254 Error output:
    npm WARN testbase@1.0.0 No description
    npm WARN testbase@1.0.0 No repository field.
    
    npm ERR! path /private/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/cordova-lib-pkgJson-jZvVOS/project/node_modules/.staging/cordova-browser-555df1c0/node_modules/abbrev
    npm ERR! code ENOENT
    npm ERR! errno -2
    npm ERR! syscall rename
    npm ERR! enoent ENOENT: no such file or directory, rename '/private/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/cordova-lib-pkgJson-jZvVOS/project/node_modules/.staging/cordova-browser-555df1c0/node_modules/abbrev' -> '/private/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/cordova-lib-pkgJson-jZvVOS/project/node_modules/.staging/abbrev-b88eb5c1'
    npm ERR! enoent This is related to npm not being able to find a file.
    npm ERR! enoent 
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/dpogue/.npm/_logs/2018-09-17T22_04_37_770Z-debug.log
  Stack:
    error properties: undefined
        at <Jasmine>
        at /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-lib/src/plugman/fetch.js:98:41
        at _rejected (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-fetch/node_modules/q/q.js:864:24)
        at /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-fetch/node_modules/q/q.js:890:30
        at Promise.when (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-fetch/node_modules/q/q.js:1142:31)
        at Promise.promise.promiseDispatch (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-fetch/node_modules/q/q.js:808:41)
        at /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-fetch/node_modules/q/q.js:624:44
        at runSingle (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-fetch/node_modules/q/q.js:137:13)
        at flush (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-fetch/node_modules/q/q.js:125:13)
        at process._tickCallback (internal/process/next_tick.js:61:11)

2) plugman/uninstall uninstallPlatform success Test 002 : should get PlatformApi instance for platform and invoke its' removePlugin method
  Message:
    Expected spy getPlatformApi to have been called with [ 'android', '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/cordova-lib-plugman_uninstall_test-u7ocG8/project' ] but actual calls were [ 'android', '/private/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/cordova-lib-plugman_uninstall_test-u7ocG8/project' ].
  Stack:
    Error: Expected spy getPlatformApi to have been called with [ 'android', '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/cordova-lib-plugman_uninstall_test-u7ocG8/project' ] but actual calls were [ 'android', '/private/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/cordova-lib-plugman_uninstall_test-u7ocG8/project' ].
        at <Jasmine>
        at /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-lib/integration-tests/plugman_uninstall.spec.js:117:48
        at _fulfilled (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-lib/node_modules/q/q.js:854:54)
        at /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-lib/node_modules/q/q.js:883:30
        at Promise.promise.promiseDispatch (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-lib/node_modules/q/q.js:816:13)
Pending:

1) HooksRunner fire method plugin hooks Test 012 : should run before_plugin_uninstall, before_plugin_install, after_plugin_install hooks for a plugin being installed with correct opts.plugin context
  Temporarily disabled with xit


2) fetch plugin in a dir with spaces should copy locally-available plugin to plugins directory when spaces in path
  No reason given

109 specs, 2 failures, 2 pending specs
Finished in 213.841 seconds
300 specs, 0 failures / 109 specs, 2 failures
cordova-android results
Command failed: npm test
npm ERR! code ELIFECYCLE
npm ERR! errno 4
npm ERR! cordova-android@7.2.0-dev unit-tests: `jasmine --config=spec/unit/jasmine.json`
npm ERR! Exit status 4
npm ERR! 
npm ERR! Failed at the cordova-android@7.2.0-dev unit-tests script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/dpogue/.npm/_logs/2018-09-17T22_02_59_308Z-debug.log
ERROR: "unit-tests" exited with 4.
npm ERR! Test failed.  See above for more details.


> cordova-android@7.2.0-dev test /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-android
> run-s eslint unit-tests java-unit-tests e2e-tests


> cordova-android@7.2.0-dev eslint /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-android
> run-s -c eslint:*


> cordova-android@7.2.0-dev eslint:scripts /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-android
> eslint bin spec test


> cordova-android@7.2.0-dev eslint:bins /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-android
> eslint 'bin/**/*' --ignore-pattern '**/*.*' --ignore-pattern '**/gitignore'


> cordova-android@7.2.0-dev unit-tests /Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-android
> jasmine --config=spec/unit/jasmine.json

Randomized with seed 60222
Started
.........................................................................................................................................................................rm: could not remove file (code ENOENT): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova/plugins/org.test.plugins.childbrowser/src/ios/ChildBrowser.bundle/arrow_right@2x.png

.rm: could not remove file (code ENOENT): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova/plugins/org.test.plugins.dummyplugin/src/blackberry10/index.js

.rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova/plugins/org.test.plugins.dummyplugin

rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova/plugins/org.test.plugins.dummyplugin
rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova/plugins

rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova/plugins/org.test.plugins.dummyplugin
rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova/plugins
rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova

rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova/plugins/org.test.plugins.dummyplugin
rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova/plugins
rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova
rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman

.rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova/plugins/org.test.plugins.dummyplugin

rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova/plugins/org.test.plugins.dummyplugin
rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova/plugins

rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova/plugins/org.test.plugins.dummyplugin
rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova/plugins
rm: could not remove directory (code ENOTEMPTY): /var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman/cordova

.shell.js: internal error
Error: ENOENT: no such file or directory, stat '/var/folders/9z/n6fm10417md6hps32379wb9r0000gp/T/plugman'
    at Object.statSync (fs.js:829:3)
    at Object._cp (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-android/node_modules/shelljs/src/cp.js:129:28)
    at Object.cp (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-android/node_modules/shelljs/src/common.js:186:23)
    at UserContext.<anonymous> (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-android/spec/unit/pluginHandlers/handlers.spec.js:115:23)
    at QueueRunner.attempt (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-android/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5111:44)
    at QueueRunner.run (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-android/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5149:25)
    at runNext (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-android/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5075:18)
    at next (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-android/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5082:11)
    at QueueRunner.onComplete (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-android/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5000:12)
    at Immediate._onImmediate (/Users/dpogue/Desktop/cordova-cross-spawn-test/cordova-android/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5165:12)
@dpogue

This comment has been minimized.

Copy link
Member

dpogue commented Sep 17, 2018

Yet cordova-common tests pass locally when run directly, both on master and on this branch. 馃し鈥嶁檪锔

@raphinesse

This comment has been minimized.

Copy link
Contributor

raphinesse commented Sep 17, 2018

Thanks for your feedback @dpogue. Which branch of cordova-common were you using for the test run your first comment refers to? It was run on macOS, right?

But yeah, I also had some weird test failure (using all the master branches) that did not occur when running the tests directly. That's why cordova-cli is checked out to a special branch. It was one of the uglier tests that I planned to replace anyway, but I could not figure out what was happening.

@dpogue

This comment has been minimized.

Copy link
Member

dpogue commented Sep 17, 2018

Yes, this was all on macOS. The error logs are from running your test project pointing to the cross-spawn branch.

@raphinesse

This comment has been minimized.

Copy link
Contributor

raphinesse commented Sep 17, 2018

Ah. So with master, everything passes?

@brodybits

This comment was marked as resolved.

Copy link
Contributor

brodybits commented Sep 18, 2018

From apache/cordova#16 I think it is desired to use execa instead of cross-spawn, and we should rework this PR to use execa. Or am I mistaken somehow?

@janpio

This comment was marked as resolved.

Copy link

janpio commented Sep 18, 2018

Yes your are. apache/cordova#16 is an issue for future work. This here is current work that solves a current problem just fine. No need to request further changes from @raphinesse (or any other volunteer on any PR in general that solves a problem).

Of course feel free to open PRs implementing apache/cordova#16 if you think that issue is so important that it has to be implemented now.

@brodybits

This comment was marked as resolved.

Copy link
Contributor

brodybits commented Sep 18, 2018

Yes your are. apache/cordova#16 is an issue for future work.

OK I was confused by apache/cordova#16 (comment). I will try to clarify in apache/cordova#16. Makes sense.

@janpio

This comment has been minimized.

Copy link

janpio commented Sep 18, 2018

I strikethroughed cordova-ios and cordova-osx for Windows, those platforms can not be built there.

@janpio

This comment has been minimized.

Copy link

janpio commented Sep 18, 2018

I tried to follow the instructions at the test repo, but had some problems - so I created raphinesse/cordova-cross-spawn-test#1 and raphinesse/cordova-cross-spawn-test#2.

@janpio janpio added this to 馃悾 New PR / Untriaged in Apache Cordova: Tooling Pull Requests Sep 20, 2018

@janpio janpio moved this from 馃悾 New PR / Untriaged to 鈴 Ready for Review in Apache Cordova: Tooling Pull Requests Sep 24, 2018

@raphinesse raphinesse force-pushed the cross-spawn branch from 67b60b1 to 7100af0 Sep 26, 2018

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Sep 26, 2018

Codecov Report

Merging #50 into master will increase coverage by 0.88%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #50      +/-   ##
==========================================
+ Coverage   87.82%   88.71%   +0.88%     
==========================================
  Files          19       19              
  Lines        1799     1772      -27     
  Branches      373      364       -9     
==========================================
- Hits         1580     1572       -8     
+ Misses        219      200      -19
Impacted Files Coverage 螖
src/superspawn.js 87.93% <100%> (+18.51%) 猬嗭笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 9c6cda3...7100af0. Read the comment docs.

@raphinesse

This comment has been minimized.

Copy link
Contributor

raphinesse commented Sep 26, 2018

@dpogue would you mind to run the cross-spawn-test another time. I updated it to run the tests one after another. Maybe that will resolve some failures.

@raphinesse raphinesse referenced this pull request Sep 26, 2018

Open

Cordova 9 release plan #10

7 of 32 tasks complete

@janpio janpio moved this from 馃悾 New PR / Untriaged to 鈴 Ready for Review in Apache Cordova: Platform Pull Requests Sep 29, 2018

@dpogue

This comment has been minimized.

Copy link
Member

dpogue commented Sep 29, 2018

On Linux (both before and after):
鉁 cordova-cli
鉁 cordova-plugman
鉁 cordova-create
鉁 cordova-common
鉁 cordova-fetch
鉁 cordova-lib
鉁 cordova-browser
鉁 cordova-android

iOS, macOS/OSX, and Windows can't be run on Linux.

On Mac, I'm still getting failures for cordova-common, cordova-lib, cordova-ios, and cordova-android even before I switch branches :(
Admittedly, the cordova-ios and cordova-android issues could be a result of updated build tools on my machine.

@raphinesse

This comment has been minimized.

Copy link
Contributor

raphinesse commented Sep 30, 2018

Thanks for trying again @dpogue. Unfortunately I had messed up the change and the tests did not actually run in series. I updated master with a proper change. My apologies 馃檱

I also ran the test suite on Travis' OS X and updated the checklist in my original post accordingly.

@raphinesse

This comment has been minimized.

Copy link
Contributor

raphinesse commented Oct 1, 2018

After the latest fixes for cordova-lib by @dpogue we have passing tests on macOS:

@raphinesse

This comment has been minimized.

Copy link
Contributor

raphinesse commented Oct 1, 2018

Extending the macOS tests on Travis CI to platform-ios and platform-osx shows there are still problems with cordova-common@master: https://travis-ci.org/raphinesse/cordova-cross-spawn-test/jobs/435576765.

Judging from how the output looks, I'd aggree with @dpogue's previous suspicion:

I suspect [these failures] are related to those tests not being updated to account for fs-extra in cordova-common and cordova-lib.

@dpogue

This comment has been minimized.

Copy link
Member

dpogue commented Oct 1, 2018

Okay, so the cordova-ios tests are known to fail with those errors. My cordova-ios and cordova-android tests also failed due to updated native toolchains.

I got some coworkers to run it, and cordova-android is passing for them on macOS both before/after the cross-spawn changes. 馃槃

@dpogue

dpogue approved these changes Nov 1, 2018

Copy link
Member

dpogue left a comment

馃憤

Apache Cordova: Platform Pull Requests automation moved this from 鈴 Ready for Review to 鉁 Approved, waiting for Merge Nov 1, 2018

Apache Cordova: Tooling Pull Requests automation moved this from 鈴 Ready for Review to 鉁 Approved, waiting for Merge Nov 1, 2018

@dpogue

This comment has been minimized.

Copy link
Member

dpogue commented Nov 1, 2018

I guess when we merge we should cherry-pick the cross-spawn commit and not the TMP one?

@raphinesse

This comment has been minimized.

Copy link
Contributor

raphinesse commented Nov 1, 2018

@dpogue Exactly, the one marked TMP was only to silence an unrelated error.

@dpogue dpogue closed this in 1b4c649 Nov 1, 2018

Apache Cordova: Platform Pull Requests automation moved this from 鉁 Approved, waiting for Merge to 鈽狅笍 Closed/Abandoned Nov 1, 2018

Apache Cordova: Tooling Pull Requests automation moved this from 鉁 Approved, waiting for Merge to 鈽狅笍 Closed/Abandoned Nov 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment