Closed Bug 1002775 Opened 11 years ago Closed 11 years ago

For the purpose of continuous integration testing, makedocs.pl should return failed status if one or more errors occurred building docs

Categories

(Bugzilla :: Documentation, enhancement)

4.5.4
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: dkl, Assigned: dkl)

Details

Attachments

(2 files, 2 obsolete files)

Currently if docs/makedocs.pl fails in any of the steps it returns a 0 since the return value for each of the system() calls is not inspected. We should check the return value and die if any part of the docs process fails. This will also allow proper failure detection in the Travis CI system I am working on. Patch coming. dkl
We shouldn't die. We should continue with compiling the remaining doc.
Severity: normal → enhancement
(In reply to Frédéric Buclin from comment #1) > We shouldn't die. We should continue with compiling the remaining doc. Then I will check the return value of each system() call, collect the results and at the end return the correct result if there were one or more errors. This will still satisfy what I need. dkl
Severity: enhancement → normal
Summary: For the purpose of continuous integration testing, makedocs.pl should fail early and with a true value if the docs build fails in anyway → For the purpose of continuous integration testing, makedocs.pl should return failed status if one or more errors occurred building docs
Severity: normal → enhancement
Attached patch 1002775_1.patch (obsolete) — Splinter Review
Attachment #8414494 - Flags: review?(glob)
Comment on attachment 8414494 [details] [diff] [review] 1002775_1.patch Review of attachment 8414494 [details] [diff] [review]: ----------------------------------------------------------------- ::: docs/makedocs.pl @@ +63,5 @@ > > say "Creating $name documentation ..." if defined $name; > say "$cmdline\n"; > system $cmdline; > + $error_found = 1 if $?; you should be checking value returned by system() instead: system($cmdline) == 0 or $error_found = 1;
Attachment #8414494 - Flags: review?(glob) → review-
Attached patch 1002775_2.patch (obsolete) — Splinter Review
Attachment #8414502 - Flags: review?(glob)
Attachment #8414494 - Attachment is obsolete: true
Comment on attachment 8414502 [details] [diff] [review] 1002775_2.patch Review of attachment 8414502 [details] [diff] [review]: ----------------------------------------------------------------- r=glob
Attachment #8414502 - Flags: review?(glob) → review+
Flags: approval?
Flags: approval? → approval+
Target Milestone: --- → Bugzilla 5.0
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git cfbeadc..4ad3e58 master -> master
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment on attachment 8414502 [details] [diff] [review] 1002775_2.patch >+die "Error occurred building the documentation\n" if $error_found; I don't see the point to die at this point. You could simply return $error_found.
Reopening, as I think it's wrong to die, and this doesn't bring any value.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch 1002775_3.patchSplinter Review
Attachment #8414502 - Attachment is obsolete: true
Attachment #8414694 - Flags: review?(LpSolit)
Attached patch 1002775_4.patchSplinter Review
Attachment #8414694 - Attachment is obsolete: true
Attachment #8414694 - Flags: review?(LpSolit)
Attachment #8414722 - Flags: review?(LpSolit)
Comment on attachment 8414722 [details] [diff] [review] 1002775_4.patch (In reply to Frédéric Buclin from comment #9) > Reopening, as I think it's wrong to die, and this doesn't bring any value. i disagree, which is why this patch got my approval+ provided a clear final error when something went wrong while building documentation is useful.
Attachment #8414722 - Flags: review?(LpSolit) → review-
Attachment #8414694 - Attachment is obsolete: false
Attachment #8414694 - Flags: review+
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: