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

CI: travis: fix du -> df and capture it also directly from test #242

Merged
merged 2 commits into from
Dec 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 18 additions & 27 deletions .tito/custom.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
#
# Copyright (c) 2016 Red Hat, Inc.
#
# All rights reserved.
#
# Author: Jan Pokorny <[email protected]>
# (using src/tito/builder/fetch.py from the tito project as a template)
#
# libqb is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2.1 of the License, or
# (at your option) any later version.
#
# libqb is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with libqb. If not, see <http://www.gnu.org/licenses/>.
#
# -*- coding: UTF-8 -*-
"""Tito ad-hoc module for custom git repo -> spec + archive metamorphosis"""

from __future__ import (print_function, unicode_literals, absolute_import,
division)

__author__ = "Jan Pokorný <[email protected]>"
__copyright__ = "Copyright 2016 Red Hat, Inc."
__license__ = "LGPLv2.1+ WITHOUT ANY WARRANTY"


from os.path import basename, join
from shutil import copyfile
Expand All @@ -32,18 +21,20 @@ class NativeFetchBuilder(FetchBuilder):
"""
A specialized FetchBuilder to just setup the specfile + archive
using package-native scripts, which currently boils down to a sequence
that needs to be configured (e.g.,
"./autogen.sh && ./configure && make dist foo.spec").
that needs to be configured via fetch_prep_command option in builder
section (e.g., "./autogen.sh && ./configure && make dist foo.spec").

Uses code of src/tito/builder/fetch.py from the tito project as a template.
"""
REQUIRED_ARGS = []

def __init__(self, name=None, tag=None, build_dir=None,
config=None, user_config=None,
args=None, **kwargs):
config=None, user_config=None,
args=None, **kwargs):

BuilderBase.__init__(self, name=name, build_dir=build_dir,
config=config,
user_config=user_config, args=args, **kwargs)
config=config,
user_config=user_config, args=args, **kwargs)

if tag:
error_out("FetchBuilder does not support building specific tags.")
Expand Down
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ addons:
script: RPMBUILDOPTS_="--nodeps --define '_without_check 1'";
./autogen.sh
&& ./configure
&& VERBOSE=1 make distcheck
&& make distcheck CPPFLAGS=-Dci_dump_shm_usage VERBOSE=1
&& sed "s|RPMBUILDOPTS =|\\0 ${RPMBUILDOPTS_}|" Makefile | make -f- rpm

after_failure:
# keep an eye on issue #234 if it recidivates
- for f in $(ls -1 /dev/shm/qb-test*); do ls -l "$f"; lsof -- "$f"; done
#- ls -l /var/run/*
- mount | grep -e /shm #-e /var
- du -h | grep -e /shm #-e /var
- df -h | grep -e /shm #-e /var
- lsblk -f
- cat /tmp/_shm_usage

notifications:
irc: "irc.freenode.net#clusterlabs-dev"
3 changes: 3 additions & 0 deletions tests/check_ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,9 @@ static void test_max_dgram_size(void)
/* extra troubleshooting, report also on i and errno variables;
related: https://github.com/ClusterLabs/libqb/issues/234 */
if (init != try) {
#ifdef ci_dump_shm_usage
system("df -h | grep -e /shm >/tmp/_shm_usage");
#endif
ck_abort_msg("Assertion 'init==try' failed:"
" init==%#x, try==%#x, i=%d, errno=%d",
init, try, i, errno);
Expand Down