Use 'prove' as test harness, enable shell tracing
With 'prove' as the test harness the tests can be run in parallel on EPEL as well as Fedora targets. Move GIT_TEST_OPTS to config.mak along with the new test options and enable shell tracing (-x). The output from failures when tracing is enabled should allow us to more easily diagnose test failures. Explicitly use /bin/bash as the shell for the test suite; it allows using "-x" reliably across the whole test suite. This is made possible by changes included in 2.16.0 thanks to Jeff King¹, particularly: 3f824e91c8 t/Makefile: introduce TEST_SHELL_PATH f5ba2de6bc test-lib: make "-x" work with "--verbose-log" 90c8a1db9d test-lib: silence "-x" cleanup under bash ¹ https://github.com/gitster/git/tree/jk/test-suite-tracing
This commit is contained in:
parent
6adaa76501
commit
62f562d630
22
git.spec
22
git.spec
@ -35,14 +35,6 @@
|
|||||||
%global test_links 0
|
%global test_links 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Run tests in parallel. This speeds up the test suite quite a bit. The
|
|
||||||
# -O (--output-sync) option requires make > 4.0, which is not available on
|
|
||||||
# EL <= 7. Without it, running the tests in parallel causes the output to
|
|
||||||
# be rather unweildy, so restrict parallel tests to Fedora.
|
|
||||||
%if 0%{?fedora}
|
|
||||||
%global make_test_opts -O %{?_smp_mflags}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Define for release candidates
|
# Define for release candidates
|
||||||
#global rcrev .rc0
|
#global rcrev .rc0
|
||||||
|
|
||||||
@ -124,6 +116,7 @@ BuildRequires: acl
|
|||||||
# Needed by t5540-http-push-webdav.sh
|
# Needed by t5540-http-push-webdav.sh
|
||||||
BuildRequires: apr-util-bdb
|
BuildRequires: apr-util-bdb
|
||||||
%endif
|
%endif
|
||||||
|
BuildRequires: bash
|
||||||
BuildRequires: cvs
|
BuildRequires: cvs
|
||||||
BuildRequires: cvsps
|
BuildRequires: cvsps
|
||||||
BuildRequires: gnupg
|
BuildRequires: gnupg
|
||||||
@ -136,6 +129,7 @@ BuildRequires: jgit
|
|||||||
%endif
|
%endif
|
||||||
BuildRequires: mod_dav_svn
|
BuildRequires: mod_dav_svn
|
||||||
BuildRequires: pcre
|
BuildRequires: pcre
|
||||||
|
BuildRequires: perl(App::Prove)
|
||||||
BuildRequires: perl(CGI)
|
BuildRequires: perl(CGI)
|
||||||
BuildRequires: perl(CGI::Carp)
|
BuildRequires: perl(CGI::Carp)
|
||||||
BuildRequires: perl(CGI::Util)
|
BuildRequires: perl(CGI::Util)
|
||||||
@ -387,6 +381,11 @@ PYTHON_PATH = %{__python2}
|
|||||||
htmldir = %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
|
htmldir = %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
|
||||||
prefix = %{_prefix}
|
prefix = %{_prefix}
|
||||||
gitwebdir = %{_localstatedir}/www/git
|
gitwebdir = %{_localstatedir}/www/git
|
||||||
|
|
||||||
|
# Test options
|
||||||
|
DEFAULT_TEST_TARGET = prove
|
||||||
|
GIT_PROVE_OPTS = --verbose --normalize %{?_smp_mflags}
|
||||||
|
GIT_TEST_OPTS = -x --verbose-log
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Filter bogus perl requires
|
# Filter bogus perl requires
|
||||||
@ -613,9 +612,11 @@ export GIT_TEST_GIT_DAEMON=true
|
|||||||
export GIT_TEST_HTTPD=true
|
export GIT_TEST_HTTPD=true
|
||||||
export GIT_TEST_SVNSERVE=true
|
export GIT_TEST_SVNSERVE=true
|
||||||
|
|
||||||
|
# Use bash for the tests
|
||||||
|
export TEST_SHELL_PATH=/bin/bash
|
||||||
|
|
||||||
# Run the tests
|
# Run the tests
|
||||||
GIT_TEST_OPTS='--verbose-log' make %{?make_test_opts} test || \
|
make test || ./print-failed-test-output
|
||||||
./print-failed-test-output
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -769,6 +770,7 @@ rm -rf %{buildroot}
|
|||||||
%changelog
|
%changelog
|
||||||
* Thu Jan 18 2018 Todd Zullinger <tmz@pobox.com> - 2.16.0-1
|
* Thu Jan 18 2018 Todd Zullinger <tmz@pobox.com> - 2.16.0-1
|
||||||
- Update to 2.16.0
|
- Update to 2.16.0
|
||||||
|
- Use 'prove' as test harness, enable shell tracing
|
||||||
|
|
||||||
* Fri Jan 12 2018 Todd Zullinger <tmz@pobox.com>
|
* Fri Jan 12 2018 Todd Zullinger <tmz@pobox.com>
|
||||||
- Add %%{emacs_filesystem} to simplify emacs support
|
- Add %%{emacs_filesystem} to simplify emacs support
|
||||||
|
Loading…
Reference in New Issue
Block a user