Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
4ce58244
Commit
4ce58244
authored
Jun 12, 2015
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3214 from libgit2/cmn/push-tests
travis: fail if we fail the push tests
parents
2deb3608
352ee171
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
script/cibuild.sh
+2
-2
tests/online/clone.c
+1
-0
tests/online/push.c
+7
-3
No files found.
script/cibuild.sh
View file @
4ce58244
...
...
@@ -53,8 +53,8 @@ export GITTEST_REMOTE_SSH_PASSPHRASE=""
if
[
-e
./libgit2_clar
]
;
then
./libgit2_clar
-sonline
::push
-sonline
::clone::ssh_cert
&&
./libgit2_clar
-sonline
::clone::ssh_with_paths
./libgit2_clar
-sonline
::clone::ssh_with_paths
||
exit
$?
if
[
"
$TRAVIS_OS_NAME
"
=
"linux"
]
;
then
./libgit2_clar
-sonline
::clone::cred_callback
./libgit2_clar
-sonline
::clone::cred_callback
||
exit
$?
fi
fi
tests/online/clone.c
View file @
4ce58244
...
...
@@ -428,6 +428,7 @@ void test_online_clone__ssh_with_paths(void)
g_options
.
remote_cb
=
custom_remote_ssh_with_paths
;
g_options
.
fetch_opts
.
callbacks
.
transport
=
git_transport_ssh_with_paths
;
g_options
.
fetch_opts
.
callbacks
.
credentials
=
cred_cb
;
g_options
.
fetch_opts
.
callbacks
.
payload
=
&
arr
;
cl_git_fail
(
git_clone
(
&
g_repo
,
remote_url
,
"./foo"
,
&
g_options
));
...
...
tests/online/push.c
View file @
4ce58244
...
...
@@ -319,6 +319,8 @@ void test_online_push__initialize(void)
git_vector
delete_specs
=
GIT_VECTOR_INIT
;
const
git_remote_head
**
heads
;
size_t
heads_len
;
git_push_options
push_opts
=
GIT_PUSH_OPTIONS_INIT
;
git_fetch_options
fetch_opts
=
GIT_FETCH_OPTIONS_INIT
;
_repo
=
cl_git_sandbox_init
(
"push_src"
);
...
...
@@ -370,7 +372,7 @@ void test_online_push__initialize(void)
record_callbacks_data_clear
(
&
_record_cbs_data
);
cl_git_pass
(
git_remote_connect
(
_remote
,
GIT_DIRECTION_PUSH
,
NULL
));
cl_git_pass
(
git_remote_connect
(
_remote
,
GIT_DIRECTION_PUSH
,
&
_record_cbs
));
/* Clean up previously pushed branches. Fails if receive.denyDeletes is
* set on the remote. Also, on Git 1.7.0 and newer, you must run
...
...
@@ -386,14 +388,16 @@ void test_online_push__initialize(void)
delete_specs
.
length
,
};
cl_git_pass
(
git_remote_upload
(
_remote
,
&
arr
,
NULL
));
memcpy
(
&
push_opts
.
callbacks
,
&
_record_cbs
,
sizeof
(
git_remote_callbacks
));
cl_git_pass
(
git_remote_upload
(
_remote
,
&
arr
,
&
push_opts
));
}
git_remote_disconnect
(
_remote
);
git_vector_free
(
&
delete_specs
);
/* Now that we've deleted everything, fetch from the remote */
cl_git_pass
(
git_remote_fetch
(
_remote
,
NULL
,
NULL
,
NULL
));
memcpy
(
&
fetch_opts
.
callbacks
,
&
_record_cbs
,
sizeof
(
git_remote_callbacks
));
cl_git_pass
(
git_remote_fetch
(
_remote
,
NULL
,
&
fetch_opts
,
NULL
));
}
void
test_online_push__cleanup
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment