Closed Bug 956004 Opened 7 years ago Closed 7 years ago
define a macro for node
we would like to have capability for running build scripts on node.js so we need to define a marco for it.
Assignee: yurenju.mozilla → gduan
This patch has implemeted.. 1. Add run-node-command We can replace run-js-command to run jsfile in nodejs. 2. Separate utils.js into utils.js, utils-node.js and utils-xpc.js. Many methods in utils.js are highly env-depending, so I separate those into two js file, 3. install-gaia.js is able to run with node.js Rewrite some of utils methods in utils-node.js.
Attachment #8355490 - Flags: review?(yurenju.mozilla)
For item3 in comment 1, we need to replace |@$(call run-js-command, install-gaia)| with |@$(call run-node-command, install-gaia)|.
Comment on attachment 8355490 [details] PR to master Great job! please fix some nits on github and don't forget test it on windows!
Attachment #8355490 - Flags: review?(yurenju.mozilla) → review+
All the nits should be fixed. However, we cannot echo the output of b2g-ps into tempFile on windows with execSync npm module. I'll keep looking into it.
I'll fix comment 4 in bug 955992 for the problem of install-gaia.js on Windows. This patch has defined a clear structure for node env, so I think I should merge it into master first, then people can easily refactor other js file for node. https://github.com/mozilla-b2g/gaia/commit/6d59734b0b1700a594b4f80f415897e3e0fde682
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Summary: define a marco for node.js command → define a macro for node.js command
thank you Fabrice :-)
Reverted for making the Gaia integration tests on TBPL basically perma-fail. https://github.com/mozilla-b2g/gaia/commit/9756fd191f8ba6a44545b242cd095e4562e47f2c https://tbpl.mozilla.org/php/getParsedLog.php?id=32634503&tree=B2g-Inbound
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
It seems that execSync module has to be compiled by gyp which tbpl doesn't have. We need a new way to run sync command line.
Hi Gregory, I have a node module(execSync) which allows me to run shell command in sync, but unfortunately, it requires g++ to do some compile things and I think tpbl does not support g++ command based on the log in comment 7. Do you have any idea I can do without removing the node module? thanks,
If g++ is not available on the builders, you'll have to update the build environment to contain g++. I'm assuming that's Release Engineering you'll need to talk to. Coop?
Flags: needinfo?(gps) → needinfo?(coop)
(In reply to George Duan [:gduan] from comment #9) > I have a node module(execSync) which allows me to run shell command in sync, > but unfortunately, it requires g++ to do some compile things and I think > tpbl does not support g++ command based on the log in comment 7. > Do you have any idea I can do without removing the node module? There's no way to compile this particular module without g++? We can loan you a build slave if you want to play around with different options, including installing g++. If there's no way around g++, we can file a releng bug to get it added to the mock env for b2g/gaia builds. https://wiki.mozilla.org/ReleaseEngineering/How_To/Request_a_slave
Hi Yuren, I remove execSync module from package.json, for the rest of the things should be the same as previous patch. I will keep implementing the promise pattern in bug 955992 to solve sync pb. please kindly check it again. Thanks.
Attachment #8359559 - Flags: review?(yurenju.mozilla)
Comment on attachment 8359559 [details] PR to master Basicly same as previous pull request but removed execSync, r=yurenju. please keep an eye on TBPL.
Attachment #8359559 - Flags: review?(yurenju.mozilla) → review+
Thanks, I'll wait for TBPL's result. merge into master https://github.com/mozilla-b2g/gaia/commit/39927a6d72b453b04e2345bb0af6282416c8f12d
sorry report of TBPL is this one: https://tbpl.mozilla.org/?tree=B2g-Inbound&rev=3ecd352ded47
TBPL looks great. thanks
Status: REOPENED → RESOLVED
Closed: 7 years ago → 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.