SHA256
1
0
forked from pool/ninja

Accepting request 263065 from devel:tools:building

- Update to version 1.5.3
  * Reaping finished subprocesses now has precedence over
    starting new jobs
  * ninja no longer depends on googletest
- Install bash/zsh completion
- Install vim syntax file
- Implement %check
- Add ninja-disable-maxprocs-test.patch to disable max procs test,
  it needs a ulimit raise.

OBS-URL: https://build.opensuse.org/request/show/263065
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ninja?expand=0&rev=11
This commit is contained in:
Dominique Leuenberger 2014-11-28 07:46:56 +00:00 committed by Git OBS Bridge
commit 1d3ce7ae92
5 changed files with 74 additions and 5 deletions

View File

@ -0,0 +1,43 @@
Index: ninja-1.5.3/src/subprocess_test.cc
===================================================================
--- ninja-1.5.3.orig/src/subprocess_test.cc
+++ ninja-1.5.3/src/subprocess_test.cc
@@ -166,38 +166,6 @@ TEST_F(SubprocessTest, SetWithMulti) {
}
}
-// OS X's process limit is less than 1025 by default
-// (|sysctl kern.maxprocperuid| is 709 on 10.7 and 10.8 and less prior to that).
-#if !defined(__APPLE__) && !defined(_WIN32)
-TEST_F(SubprocessTest, SetWithLots) {
- // Arbitrary big number; needs to be over 1024 to confirm we're no longer
- // hostage to pselect.
- const unsigned kNumProcs = 1025;
-
- // Make sure [ulimit -n] isn't going to stop us from working.
- rlimit rlim;
- ASSERT_EQ(0, getrlimit(RLIMIT_NOFILE, &rlim));
- if (!EXPECT_GT(rlim.rlim_cur, kNumProcs)) {
- printf("Raise [ulimit -n] well above %u to make this test go\n", kNumProcs);
- return;
- }
-
- vector<Subprocess*> procs;
- for (size_t i = 0; i < kNumProcs; ++i) {
- Subprocess* subproc = subprocs_.Add("/bin/echo");
- ASSERT_NE((Subprocess *) 0, subproc);
- procs.push_back(subproc);
- }
- while (!subprocs_.running_.empty())
- subprocs_.DoWork();
- for (size_t i = 0; i < procs.size(); ++i) {
- ASSERT_EQ(ExitSuccess, procs[i]->Finish());
- ASSERT_NE("", procs[i]->GetOutput());
- }
- ASSERT_EQ(kNumProcs, subprocs_.finished_.size());
-}
-#endif // !__APPLE__ && !_WIN32
-
// TODO: this test could work on Windows, just not sure how to simply
// read stdin.
#ifndef _WIN32

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Wed Nov 26 07:42:03 UTC 2014 - idonmez@suse.com
- Update to version 1.5.3
* Reaping finished subprocesses now has precedence over
starting new jobs
* ninja no longer depends on googletest
- Install bash/zsh completion
- Install vim syntax file
- Implement %check
- Add ninja-disable-maxprocs-test.patch to disable max procs test,
it needs a ulimit raise.
-------------------------------------------------------------------
Thu Sep 11 10:21:01 UTC 2014 - idonmez@suse.com

View File

@ -20,13 +20,14 @@ Name: ninja
Summary: A small build system closest in spirit to Make
License: Apache-2.0
Group: Development/Tools/Building
Version: 1.5.1
Version: 1.5.3
Release: 0
Url: https://github.com/martine/ninja
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
BuildRequires: python-base
Source0: https://github.com/martine/ninja/archive/v%{version}.tar.gz
Patch1: ninja-disable-maxprocs-test.patch
%description
Ninja is yet another build system.
@ -35,17 +36,29 @@ and orchestrates building them, quickly.
%prep
%setup -q
%patch1 -p1
%build
python ./bootstrap.py
python ./configure.py --bootstrap
%install
mkdir -p %{buildroot}%{_bindir}
install -m 0755 ninja %{buildroot}%{_bindir}/ninja
install -D -m 0644 misc/zsh-completion %{buildroot}%{_datadir}/zsh/site-functions/_ninja
install -D -m 0644 misc/ninja.vim %{buildroot}%{_datadir}/vim/site/syntax/ninja.vim
install -D -m 0644 misc/bash-completion %{buildroot}%{_sysconfdir}/bash_completion.d/ninja
%check
./ninja ninja_test
./ninja_test
%files
%defattr(-,root,root)
%{_bindir}/ninja
%{_datadir}/zsh
%{_datadir}/vim
%{_sysconfdir}/bash_completion.d
%doc COPYING
%changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fba77b9ed4b4dd0e86c4513776938dc64bd4508dc2055b04c0c6df68bcfa397d
size 163437

3
v1.5.3.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7c953b5a7c26cfcd082882e3f3e2cd08fee8848ad228bb47223b18ea18777ec0
size 168829