Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BuildPackages.sh: add option to abort upon failure #2022

Merged
merged 1 commit into from
Dec 13, 2017

Conversation

fingolfin
Copy link
Member

With --strict given, BuildPackages.sh immediately aborts with a non-zero exit code if there are any errors building a package. This way, it can be used effectively from other scripts, e.g. for package's Travis tests.

It would IMHO be highly desirable to get this into the stable-4.9 branch, so that packages can use a uniform test setup for both the stable and master branches.

With --strict given, BuildPackages.sh immediately aborts with a non-zero
exit code if there are any errors building a package. This way, it can
be used effectively from other scripts, e.g. for package's Travis tests.
@fingolfin fingolfin added topic: build system topic: packages issues or PRs related to package handling, or specific to a package (for packages w/o issue tracker) topic: tests issues or PRs related to tests labels Dec 13, 2017
@fingolfin fingolfin added this to the GAP 4.9.0 milestone Dec 13, 2017
@fingolfin
Copy link
Member Author

BTW, I did verify locally that the exit code handling works, but I don't see a good way to add a test to the GAP test suite for it. However, I plan to adapt multiple packages to take advantage of this feature ASAP, so that will effectively test it. See e.g. gap-packages/FactInt#5 and gap-packages/ZeroMQInterface#18 (and many more to come, once this PR here is merged)

@codecov
Copy link

codecov bot commented Dec 13, 2017

Codecov Report

Merging #2022 into master will decrease coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2022      +/-   ##
==========================================
- Coverage      66%      66%   -0.01%     
==========================================
  Files         898      898              
  Lines      273268   273267       -1     
  Branches    12745    12745              
==========================================
- Hits       180378   180377       -1     
+ Misses      90071    90069       -2     
- Partials     2819     2821       +2
Impacted Files Coverage Δ
src/funcs.c 76.24% <0%> (-0.27%) ⬇️
src/lists.c 56.6% <0%> (-0.12%) ⬇️
src/stats.c 79.7% <0%> (+0.13%) ⬆️
src/hpc/thread.c 46.21% <0%> (+0.19%) ⬆️
src/hpc/traverse.c 78.29% <0%> (+0.3%) ⬆️

@olexandr-konovalov
Copy link
Member

https://travis-ci.org/gap-system/gap-docker-master-testsuite is another place where I will use it. Totally support adding this to GAP 4.9.0.

@fingolfin
Copy link
Member Author

@alex-konovalov then perhaps approve & merge?

Copy link
Member

@olexandr-konovalov olexandr-konovalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not run it, but the changes look OK, and I trust @fingolfin's tests. This is useful.

@olexandr-konovalov olexandr-konovalov merged commit 36abc90 into gap-system:master Dec 13, 2017
@fingolfin fingolfin deleted the mh/BuildPackages.sh branch December 14, 2017 12:30
@olexandr-konovalov olexandr-konovalov added the release notes: added PRs introducing changes that have since been mentioned in the release notes label Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: added PRs introducing changes that have since been mentioned in the release notes topic: build system topic: packages issues or PRs related to package handling, or specific to a package (for packages w/o issue tracker) topic: tests issues or PRs related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants