aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml2
-rw-r--r--.valgrind.supp7
-rw-r--r--CMakeLists.txt4
-rw-r--r--CONTRIBUTING.md46
-rw-r--r--Makefile2
-rw-r--r--README.md6
-rw-r--r--cmake/FindLibUV.cmake12
-rwxr-xr-xscripts/travis.sh7
-rw-r--r--src/testdir/Makefile21
10 files changed, 92 insertions, 16 deletions
diff --git a/.gitignore b/.gitignore
index a36e19fe97..128b1b1481 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,7 @@ src/testdir/test.log
src/testdir/test.ok
src/testdir/*.failed
src/testdir/X*
+src/testdir/valgrind.*
# local make targets
local.mk
diff --git a/.travis.yml b/.travis.yml
index d1a0445925..cb54bbcc09 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,2 +1,2 @@
language: c
-script: make cmake CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$PWD/dist" && make && make test > /dev/null 2>&1 && make install
+script: ./scripts/travis.sh
diff --git a/.valgrind.supp b/.valgrind.supp
new file mode 100644
index 0000000000..a0a96518ba
--- /dev/null
+++ b/.valgrind.supp
@@ -0,0 +1,7 @@
+{
+ nss_parse_service_list
+ Memcheck:Leak
+ fun:malloc
+ fun:nss_parse_service_list
+ fun:__nss_database_lookup
+}
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 04df162f07..04b59acd28 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,6 +18,10 @@ else()
set(DEBUG 0)
endif()
+if(DEFINED $ENV{VALGRIND_CHECK})
+ add_definitions(-DEXITFREE)
+endif()
+
# Modules used by platform auto-detection
include(CheckLibraryExists)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000000..e0202e5401
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,46 @@
+# Contributing to Neovim
+
+## Thank you
+
+Thanks for considering contributing to neovim. To make the process as smooth
+as possible we would ask you to follow the guidelines below.
+
+## Help with contributing
+
+See [Communicating](https://github.com/neovim/neovim/wiki/Communicating).
+Raise documentation issues.
+
+## Guidelines
+
+### Finding something to do
+
+Neovim uses [waffle.io](https://waffle.io/neovim/neovim), so check there
+first.
+
+You can also ask for an issues to be assigned to you.
+Ideally wait until we assign it to you to minimize
+work duplication.
+
+### Reporting an issue
+
+- Search existing issues before raising a new one.
+- Include as much detail as possible. In particular, we need to know which
+ OS you're using.
+
+### Pull requests
+
+- Make it clear in the issue tracker what you are working on, so that
+someone else doesn't duplicate the work.
+- Use a feature branch, not master.
+- Rebase your feature branch onto origin/master before raising the PR.
+- Keep up to date with changes in master so your PR is easy to merge.
+- Be descriptive in your PR message: what is it for, why is it needed, etc.
+- Make sure the tests pass (TODO: we need to make this easier with travis etc.)
+- Squash related commits as much as possible.
+
+### Coding style
+
+- Try to match the existing indent style. (TODO: specify)
+- Don't abuse the pre-processor.
+- Don't mix platform-specific stuff into the main code.
+- TODO: commit messages?
diff --git a/Makefile b/Makefile
index 41d26b69ec..3aa82fa0bf 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
-include local.mk
-CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=.deps/usr
+CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=.deps/usr -DLibUV_USE_STATIC=YES
# Extra CMake flags which extend the default set
CMAKE_EXTRA_FLAGS :=
diff --git a/README.md b/README.md
index 059527d6f7..01ff807075 100644
--- a/README.md
+++ b/README.md
@@ -274,7 +274,7 @@ and what is currently being worked on:
#### Ubuntu/Debian
- sudo apt-get install libtool autoconf cmake libncurses5-dev g++
+ sudo apt-get install libtool autoconf automake cmake libncurses5-dev g++
#### FreeBSD 10
@@ -294,12 +294,12 @@ certificates or have not set them up correctly:
Via MacPorts:
- sudo port install curl-ca-bundle
+ sudo port install curl-ca-bundle libtool automake cmake
echo CA_CERTIFICATE=/opt/local/share/curl/curl-ca-bundle.crt >> ~/.wgetrc
Via Homebrew:
- brew install curl-ca-bundle
+ brew install curl-ca-bundle libtool automake cmake
echo CA_CERTIFICATE=/usr/local/opt/curl-ca-bundle/share/ca-bundle.crt >> ~/.wgetrc
diff --git a/cmake/FindLibUV.cmake b/cmake/FindLibUV.cmake
index d0cedfb37d..fff3823c62 100644
--- a/cmake/FindLibUV.cmake
+++ b/cmake/FindLibUV.cmake
@@ -4,6 +4,9 @@
# LibUV_FOUND - system has libuv
# LibUV_INCLUDE_DIRS - the libuv include directories
# LibUV_LIBRARIES - link these to use libuv
+#
+# Set the LibUV_USE_STATIC variable to specify if static libraries should
+# be preferred to shared ones.
include(LibFindMacros)
@@ -12,9 +15,16 @@ find_path(LibUV_INCLUDE_DIR
NAMES uv.h
)
+set(_uv_names uv)
+
+# If we're asked to use static linkage, add libuv.a as a preferred library name.
+if(LibUV_USE_STATIC)
+ list(INSERT _uv_names 0 libuv.a)
+endif(LibUV_USE_STATIC)
+
# The library itself. Note that we prefer the static version.
find_library(LibUV_LIBRARY
- NAMES libuv.a uv
+ NAMES ${_uv_names}
)
# Set the include dir variables and the libraries and let libfind_process do the rest.
diff --git a/scripts/travis.sh b/scripts/travis.sh
new file mode 100755
index 0000000000..60ed5c0d36
--- /dev/null
+++ b/scripts/travis.sh
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+# export VALGRIND_CHECK=1
+make cmake CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$PWD/dist"
+make
+make test > /dev/null 2>&1
+make install
diff --git a/src/testdir/Makefile b/src/testdir/Makefile
index 16db2846c2..1bf6f74ef8 100644
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -2,16 +2,9 @@
# Makefile to run all tests for Vim
#
-VIMPROG = ../../build/bin/nvim
+VIMPROG := ../../build/bin/nvim
-# Uncomment this line to use valgrind for memory leaks and extra warnings.
-# The output goes into a file "valgrind.testN"
-# Vim should be compiled with EXITFREE to avoid false warnings.
-# This will make testing about 10 times as slow.
-# VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=15 --log-file=valgrind.$*
-
-
-SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
+SCRIPTS := test1.out test2.out test3.out test4.out test5.out test6.out \
test7.out test8.out test9.out test10.out test11.out \
test12.out test13.out test14.out test15.out test17.out \
test18.out test19.out test20.out test21.out test22.out \
@@ -32,7 +25,15 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
test94.out test95.out test96.out test97.out test98.out \
test99.out test100.out test101.out test102.out test103.out
-SCRIPTS_GUI = test16.out
+SCRIPTS_GUI := test16.out
+
+ifdef VALGRIND_CHECK
+VALGRIND = valgrind --suppressions=../../.valgrind.supp --leak-check=yes --error-exitcode=1 --log-file=valgrind.$*
+endif
+
+ifdef TESTNUM
+SCRIPTS := test$(TESTNUM).out
+endif
.SUFFIXES: .in .out