]>
Commit | Line | Data |
---|---|---|
5be622fb CMN |
1 | #!/bin/sh |
2 | ||
039e354b | 3 | if [ -n "$COVERITY" ]; |
9bf17d2c BS |
4 | then |
5 | ./script/coverity.sh; | |
6 | exit $?; | |
7 | fi | |
8 | ||
5be622fb CMN |
9 | # Create a test repo which we can use for the online::push tests |
10 | mkdir $HOME/_temp | |
11 | git init --bare $HOME/_temp/test.git | |
12 | git daemon --listen=localhost --export-all --enable=receive-pack --base-path=$HOME/_temp $HOME/_temp 2>/dev/null & | |
13 | export GITTEST_REMOTE_URL="git://localhost/test.git" | |
14 | ||
15 | mkdir _build | |
16 | cd _build | |
5875e8d2 | 17 | cmake .. -DCMAKE_INSTALL_PREFIX=../_install $OPTIONS || exit $? |
ebda0970 | 18 | make -j2 install || exit $? |
5875e8d2 | 19 | ctest -V . || exit $? |
5be622fb CMN |
20 | |
21 | # Now that we've tested the raw git protocol, let's set up ssh to we | |
22 | # can do the push tests over it | |
23 | ||
24 | killall git-daemon | |
87339935 CMN |
25 | |
26 | if [ "$TRAVIS_OS_NAME" = "osx" ]; then | |
27 | echo 'PasswordAuthentication yes' | sudo tee -a /etc/sshd_config | |
28 | else | |
29 | sudo start ssh | |
30 | fi | |
31 | ||
5be622fb CMN |
32 | ssh-keygen -t rsa -f ~/.ssh/id_rsa -N "" -q |
33 | cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys | |
34 | ssh-keyscan -t rsa localhost >>~/.ssh/known_hosts | |
35 | ||
bf8756d6 CMN |
36 | # Get the fingerprint for localhost and remove the colons so we can parse it as a hex number |
37 | export GITTEST_REMOTE_SSH_FINGERPRINT=$(ssh-keygen -F localhost -l | tail -n 1 | cut -d ' ' -f 2 | tr -d ':') | |
38 | ||
5be622fb CMN |
39 | export GITTEST_REMOTE_URL="ssh://localhost/$HOME/_temp/test.git" |
40 | export GITTEST_REMOTE_USER=$USER | |
41 | export GITTEST_REMOTE_SSH_KEY="$HOME/.ssh/id_rsa" | |
42 | export GITTEST_REMOTE_SSH_PUBKEY="$HOME/.ssh/id_rsa.pub" | |
43 | export GITTEST_REMOTE_SSH_PASSPHRASE="" | |
44 | ||
45 | if [ -e ./libgit2_clar ]; then | |
bf8756d6 | 46 | ./libgit2_clar -sonline::push -sonline::clone::cred_callback -sonline::clone::ssh_cert && |
d4256ed5 | 47 | ./libgit2_clar -sonline::clone::ssh_with_paths |
5be622fb | 48 | fi |