Commit Graph

51 Commits

Author SHA1 Message Date
Carlos Martín Nieto
db357667bc travis: take the newer ssh-keygen format into account
The Mac machines have updated their SSH version and so the ssh-keygen
format has changed. Ask it for MD5, which is the one that is output as
hex.
2016-10-05 20:23:58 +02:00
Carlos Martín Nieto
94d565b957 cibuild: set -x
This lets us see the details of what we're doing instead of just seeing the
output of unknown commands in the build output.
2016-10-05 18:52:43 +02:00
Edward Thomson
a37624ecc7 Merge pull request #3815 from pks-t/pks/coverity-model
Coverity user model
2016-07-24 16:05:17 -04:00
Edward Thomson
0239eff354 ci: install homebrew's curl on mac 2016-07-24 14:54:40 -04:00
Edward Thomson
08556e6db3 ci: install homebrew's zlib on mac 2016-07-22 21:10:25 -04:00
Patrick Steinhardt
4d8fe1cda0 coverity: model functions printing into git_buf
The `git_buf` structure seems to be too complicated to correctly
grasp for Coverity. As such, add simpler models trying to guide
Coverity and remove false positives related to these functions.
2016-06-07 09:22:02 +02:00
Patrick Steinhardt
956f1e2387 coverity: add user model
The static analysis engine coverity allows for user models
overriding how it treats functions when analyzing code. Like
this, one can greatly reduce the rate of false positives and thus
make it easier to spot actual errors.

Add a user model that overrides function models for `git_buf_len`
and `git_vector_insert`, which together amount for a majority of
false positives.
2016-06-07 09:20:51 +02:00
Carlos Martín Nieto
db01724fd9 CI: start the proxy before the build so it's ready
It takes a bit for the propxy to get ready to accept connections, so
start it before the build so we can be reasonably sure that it's going
to be ready in time.
2016-04-19 13:54:19 +02:00
Carlos Martín Nieto
2f3f1ee085 proxy: test proxy support on Travis 2016-04-19 13:54:19 +02:00
Carlos Martín Nieto
4848dd326a Merge pull request #3647 from pks-t/pks/coverity-fixes-round6
Coverity fixes round 6
2016-03-14 17:45:15 +01:00
Carlos Martín Nieto
b1093e62d5 Remove CI support for mingw32
The tests have never run successfully and we do have successful builds
of mingw-w64, so remove these CI builds which do not add value.
2016-03-14 11:05:58 +01:00
Patrick Steinhardt
2615d0d694 coverity: report errors when uploading tarball
Curl by default does not report errors by setting the error code.
As the upload can fail through several conditions (e.g. the rate
limit, leading to unauthorized access) we should indicate this
information in Travis CI.

To improve upon the behavior, use `--write-out=%{http_code}` to
write out the HTTP code in addition to the received body and
return an error if the code does not equal 201.
2016-03-11 13:31:12 +01:00
Carlos Martín Nieto
ba9bb664f3 tests: create a ctest target for cred_callback 2016-03-03 19:31:02 +01:00
Carlos Martín Nieto
2520573778 test: make sure we retry the auth callback on all platforms
We were missing this test on Windows, which meant we didn't notice that
we never fixed the single authentication attempt it tries, nor its wrong
return code.

Enable this for the unix platforms as well over HTTP. We previously were
doing it locally but disabled it on OS X due to issues with its sshd not
accepting password authentication.
2016-03-03 11:18:03 +01:00
Patrick Steinhardt
859ed5ddc7 common: introduce GITERR_CHECK_ALLOC_BUF
We commonly have to check if a git_buf has been allocated
correctly or if we ran out of memory. Introduce a new macro
similar to `GITERR_CHECK_ALLOC` which checks if we ran OOM and if
so returns an error. Provide a `#nodef` for Coverity to mark the
error case as an abort path.
2016-02-23 11:50:23 +01:00
Patrick Steinhardt
f2a554b45e coverity: hint git_vector_foreach does not deref NULL contents
Coverity does not comprehend the connection between a vector's
size and the contents pointer, that is that the vector's pointer
is non-NULL when its size is positive. As the vector code should
be reasonably well tested and users are expected to not manually
modify a vector's contents it seems save to assume that the
macros will never dereference a NULL pointer.

Fix Coverity warnings by overriding the foreach macros with
macros that explicitly aborting when (v)->contents is NULL.
2016-02-23 11:50:23 +01:00
Patrick Steinhardt
40f6f22517 coverity: hint that string length is at least 2
When checking if a string is prefixed by a drive letter (e.g.
"C:") we verify this by inspecting the first and second character
of the string. Coverity thinks this is a defect as we do not
check the string's length first, but in fact we only check the
second character if the first character is part of the alphabet,
that is it cannot be '\0'.

Fix this by overriding the macro and explicitly checking the
string's length.
2016-02-18 20:50:33 +01:00
Patrick Steinhardt
5981ab1d70 coverity: add nodefs for abort macros
Add nodefs for macros that abort the current flow due to errors.
This includes macros that trigger on integer overflows and for
the version check macro. This aids Coverity as we point out that
these paths will cause a fatal error.
2016-02-18 20:50:33 +01:00
Patrick Steinhardt
50174ab459 coverity: use https URL for posting build
When posting our instrumented build results to Coverity we have
to include sensitive information, in particular our authorization
token. Currently we use an unencrypted channel to post this
information, leading to the token being transferred in plain.

Fix this by using a secured connection instead.
2016-02-10 11:06:23 +01:00
Patrick Steinhardt
8dddea42aa coverity: provide nodef for GITERR_CHECK_ALLOC
Coverity currently lists a lot of errors with regard to
GITERR_CHECK_ALLOC causing resource leaks. We know this macro is
only invoked when we want to abort because we are out of memory.

Coverity allows for overriding the default model where we know
that certain functions guarantee a desired behavior. The
user_nodefs.h is used to override the behavior of macros.
Re-define GITERR_CHECK_ALLOC inside of it to specify its abort
nature.
2016-02-10 10:59:14 +01:00
Carlos Martín Nieto
a0bdfe3241 travis: don't install CMake on OS X
Homebrew will error out because it's already installed.
2015-07-06 18:42:39 +02:00
Carlos Martín Nieto
d41b8ed083 travis: update the homebrew db
We need to make sure we are asking for the current version of packages,
or we might get 404s from the download service.
2015-07-06 18:32:31 +02:00
Arthur Schreiber
32f538ae28 Remove dependency installation file for travis builds.
We're installing dependencies via the APT addon now.
2015-06-27 15:02:53 +02:00
Arthur Schreiber
51f8799903 Don't try to start ssh. 2015-06-26 18:05:17 +02:00
Carlos Martín Nieto
6042a050f9 travis: fail if we fail the push tests
These tests were not being taken into consideration for the failure of
the test. They've been failing for a while now, but we hadn't noticed as
Travis was reporting the builds successful.
2015-06-12 12:17:03 +02:00
Tony Kelman
7aa96593fa set PKG_CONFIG_LIBDIR in toolchain-mingw32.cmake 2015-03-17 12:05:07 -07:00
Philip Kelley
8f426d7dd2 Win32: Enable WinHTTP for MinGW 2015-03-16 12:59:55 -07:00
Edward Thomson
3e32986114 Revert "Implement fail-fast for Travis as well"
This reverts commit ba6c53b91b.
2015-03-10 16:08:34 -04:00
Tony Kelman
4c88fd7ce6 Add MinGW-w64 to matrix
cache mingw-w64 downloads

quiet curl and 7zip

run appveyor steps in cmd for mingw
2015-03-04 16:52:37 -08:00
Tony Kelman
ba6c53b91b Implement fail-fast for Travis as well 2015-03-04 11:29:44 -08:00
Tony Kelman
ac5fad2780 add mingw to appveyor matrix
use MSYS makefiles generator

add bash script for running mingw on appveyor

add --login and fix run paths

use msys style path to appveyor-mingw.sh

add mingw path to /etc/fstab
2015-03-04 11:29:40 -08:00
Edward Thomson
6f4461763e Merge pull request #2710 from Therzok/shellcheckScripts
Run shell scripts through shellcheck
2014-11-21 10:59:20 -05:00
Ungureanu Marius
a4fccbbf9d Run shell scripts through shellcheck 2014-11-20 23:17:19 +02:00
Carlos Martín Nieto
aa5a06c37d travis: disable the cert callback on OSX
The sshd on OSX has stopped responding to the setting which this test
assumes is there, so let's disable it until we can figure out what's
happening.
2014-11-20 00:52:52 +01:00
Carlos Martín Nieto
ebda097076 script: use a parallel build on Travis 2014-09-16 17:02:32 +02:00
Carlos Martín Nieto
0fef38999a Merge remote-tracking branch 'upstream/master' into cmn/host-cert-info 2014-09-16 17:02:28 +02:00
Carlos Martín Nieto
bf8756d6a2 ssh: add test for host key
Test that the certificate check callback gets the right fingerprint from
the host we're connecting to.
2014-09-16 17:01:32 +02:00
Carlos Martín Nieto
26bf3a5346 travis: no need to clean out the test repository
This was added to avoid the remote's default branch to be considered to
the be notes one which the first network test leaves behind.
2014-08-29 15:28:10 +02:00
Carlos Martín Nieto
6a0d2b43ee Merge remote-tracking branch 'upstream/master' into cmn/ssh-retry 2014-08-27 15:09:07 +02:00
Carlos Martín Nieto
d4256ed554 ssh: provide a factory function for setting ssh paths
git allows you to set which paths to use for the git server programs
when connecting over ssh; and we want to provide something similar.

We do this by providing a factory function which can be set as the
remote's transport callback which will set the given paths upon
creation.
2014-07-07 14:51:51 +02:00
Carlos Martín Nieto
8733993599 travis: enable password authentication on OSX
Our ssh tests assume that the server supports password authentication
in a few places. This is convenient as we're not testing authentication
methods, but what happens around them.

Tell sshd on OSX to accept this form of authentication.
2014-06-26 22:58:39 +02:00
Carlos Martín Nieto
d7f962f408 ssh: request credentials again on authentication failure
Instead of completely giving up on the first failure, ask for
credentials as long as we fail to authenticate.
2014-06-26 22:58:38 +02:00
Carlos Martín Nieto
7230330740 travis: build on osx too 2014-05-21 14:43:44 +02:00
Carlos Martín Nieto
039e354b7d ciscript: don't use an empty string as a number
An empty string is not a valid number, and some shells complain.

Check instead if $COVERITY is non-empty, which is a common convention
and what we're doing anyway.
2014-04-30 12:02:10 +02:00
Ben Straub
5dae3ffe25 Only run clone-failure test on private repo 2014-02-05 19:27:27 -08:00
Ben Straub
998f0016ff Refine build limitation 2014-01-15 12:32:12 -08:00
Ben Straub
53e6f4804b Only run coverity on development 2014-01-15 12:12:17 -08:00
Ben Straub
9bf17d2cf5 Add coverity-scan script 2014-01-13 14:11:14 -08:00
Carlos Martín Nieto
5875e8d21a travis: exit on failure for anything related to building 2013-08-19 18:50:03 +02:00
Carlos Martín Nieto
6818080871 travis: really fail if the tests fail
When implementing the ssh testing, the move to the script made it so
the first test suite's exit code was ignored. Check whether the main
tests fail and exit with an error in that case.
2013-08-19 10:50:28 +02:00