Closed Bug 1074200 Opened 10 years ago Closed 10 years ago

Build should fail on error

Categories

(Firefox OS Graveyard :: Gaia::Build, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.1 S7 (24Oct)

People

(Reporter: daleharvey, Assigned: ochameau)

References

Details

Attachments

(1 file)

Put a console.log in some build file to debug, console isnt defined, that apps build errors.

I expect the makefile to quit now, its hard to notice what is an error and what is just random things being spit out
Blocks: 1079865
We have some explicit code trying to do that right:
https://github.com/mozilla-b2g/gaia/blob/master/build/xpcshell-commonjs.js#L111-L118
// When an xpcshell module throws exception which is already captured by
// JavaScript module, some exceptions will make xpcshell returns error code.
// We put quit(0); to override the return code when all exceptions are
// handled in JavaScript module.
  quit(0);
} catch(e) {
  dump('Exception: ' + e + '\n' + e.stack + '\n');
  throw(e);

But it either changed over time or xpcshell doesn't always exit with an error code when an exception hits its top level execution thread.
I would say we would just need calling quit(1) instead of throw(e).
Assignee: nobody → poirot.alex
Attached file Pull request 24945
That may just be it, but I could easily expect many failure to happen now because of this strictier code...
Let's see what try says to start with!
This behavior is really hurting us badly.
For ex in bug 1053703, we could have seen immediatly that builds were broken instead of looking at why mochitest/reftest were so broken!
Comment on attachment 8501751 [details] [review]
Pull request 24945

This patch may raise many error and introduce intermittent in gaia,
but it would help us a lot detecting issue in build system.
I would like to spawn some more try run before landing such patch to ensure we don't introduce obvious intermittents.
Attachment #8501751 - Flags: review?(gduan)
A gecko try with more tests, just to ensure that everything is green:
  https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=ce7f7571ff08
Comment on attachment 8501751 [details] [review]
Pull request 24945

Thanks !! That would helps a lot!
Attachment #8501751 - Flags: review?(gduan) → review+
Sherrifs, this changeset may introduce orange.
It will make gaia build scripts to throw and stop if any exception happens.
Whereas, before this patch we just ignore any exception and continue...

I spawn a custom gecko try and several gaia try runs and it looks as green as before this patch.
(I just rebased the gaia patch to spawn yet another try run)
Keywords: checkin-needed
https://github.com/mozilla-b2g/gaia/commit/6108f0f04fea446cba5935d72b5cbab3deadd9af
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S7 (24Oct)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: