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
6443eaf2
Commit
6443eaf2
authored
Jan 03, 2013
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable Network suite by default
parent
39cd0177
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
37 deletions
+37
-37
CMakeLists.txt
+1
-1
tests-clar/clar
+1
-1
tests-clar/online/clone.c
+8
-8
tests-clar/online/fetch.c
+7
-7
tests-clar/online/fetchhead.c
+5
-5
tests-clar/online/push.c
+15
-15
No files found.
CMakeLists.txt
View file @
6443eaf2
...
...
@@ -254,7 +254,7 @@ IF (BUILD_CLAR)
ADD_CUSTOM_COMMAND(
OUTPUT
${
CLAR_PATH
}
/clar.suite
COMMAND
${
PYTHON_EXECUTABLE
}
clar/generate.py .
COMMAND
${
PYTHON_EXECUTABLE
}
clar/generate.py .
-xonline
DEPENDS
${
SRC_TEST
}
WORKING_DIRECTORY
${
CLAR_PATH
}
)
...
...
clar
@
3f99b7f3
Subproject commit
fe7d9740becabac0e856eb0cdc19bc7e48680ba5
Subproject commit
3f99b7f36ffa2b0965eefd04abac998fa37ced23
tests-clar/online/clone.c
View file @
6443eaf2
...
...
@@ -10,7 +10,7 @@ static git_repository *g_repo;
static
git_remote
*
g_origin
;
static
git_clone_options
g_options
;
void
test_
clone_network
__initialize
(
void
)
void
test_
online_clone
__initialize
(
void
)
{
g_repo
=
NULL
;
...
...
@@ -19,7 +19,7 @@ void test_clone_network__initialize(void)
cl_git_pass
(
git_remote_new
(
&
g_origin
,
NULL
,
"origin"
,
LIVE_REPO_URL
,
GIT_REMOTE_DEFAULT_FETCH
));
}
void
test_
clone_network
__cleanup
(
void
)
void
test_
online_clone
__cleanup
(
void
)
{
git_remote_free
(
g_origin
);
}
...
...
@@ -34,7 +34,7 @@ static void cleanup_repository(void *path)
}
void
test_
clone_network
__network_full
(
void
)
void
test_
online_clone
__network_full
(
void
)
{
git_remote
*
origin
;
...
...
@@ -48,7 +48,7 @@ void test_clone_network__network_full(void)
}
void
test_
clone_network
__network_bare
(
void
)
void
test_
online_clone
__network_bare
(
void
)
{
git_remote
*
origin
;
...
...
@@ -62,7 +62,7 @@ void test_clone_network__network_bare(void)
git_remote_free
(
origin
);
}
void
test_
clone_network
__cope_with_already_existing_directory
(
void
)
void
test_
online_clone
__cope_with_already_existing_directory
(
void
)
{
cl_set_cleanup
(
&
cleanup_repository
,
"./foo"
);
...
...
@@ -70,7 +70,7 @@ void test_clone_network__cope_with_already_existing_directory(void)
cl_git_pass
(
git_clone
(
&
g_repo
,
g_origin
,
"./foo"
,
&
g_options
));
}
void
test_
clone_network
__empty_repository
(
void
)
void
test_
online_clone
__empty_repository
(
void
)
{
git_reference
*
head
;
...
...
@@ -91,7 +91,7 @@ void test_clone_network__empty_repository(void)
git_reference_free
(
head
);
}
void
test_
clone_network
__can_prevent_the_checkout_of_a_standard_repo
(
void
)
void
test_
online_clone
__can_prevent_the_checkout_of_a_standard_repo
(
void
)
{
git_buf
path
=
GIT_BUF_INIT
;
cl_set_cleanup
(
&
cleanup_repository
,
"./foo"
);
...
...
@@ -118,7 +118,7 @@ static void fetch_progress(const git_transfer_progress *stats, void *payload)
(
*
was_called
)
=
true
;
}
void
test_
clone_network
__can_checkout_a_cloned_repo
(
void
)
void
test_
online_clone
__can_checkout_a_cloned_repo
(
void
)
{
git_checkout_opts
opts
=
GIT_CHECKOUT_OPTS_INIT
;
git_buf
path
=
GIT_BUF_INIT
;
...
...
tests-clar/online/fetch.c
View file @
6443eaf2
...
...
@@ -3,12 +3,12 @@
static
git_repository
*
_repo
;
static
int
counter
;
void
test_
network
_fetch__initialize
(
void
)
void
test_
online
_fetch__initialize
(
void
)
{
cl_git_pass
(
git_repository_init
(
&
_repo
,
"./fetch"
,
0
));
}
void
test_
network
_fetch__cleanup
(
void
)
void
test_
online
_fetch__cleanup
(
void
)
{
git_repository_free
(
_repo
);
_repo
=
NULL
;
...
...
@@ -53,22 +53,22 @@ static void do_fetch(const char *url, git_remote_autotag_option_t flag, int n)
git_remote_free
(
remote
);
}
void
test_
network
_fetch__default_git
(
void
)
void
test_
online
_fetch__default_git
(
void
)
{
do_fetch
(
"git://github.com/libgit2/TestGitRepository.git"
,
GIT_REMOTE_DOWNLOAD_TAGS_AUTO
,
6
);
}
void
test_
network
_fetch__default_http
(
void
)
void
test_
online
_fetch__default_http
(
void
)
{
do_fetch
(
"http://github.com/libgit2/TestGitRepository.git"
,
GIT_REMOTE_DOWNLOAD_TAGS_AUTO
,
6
);
}
void
test_
network
_fetch__no_tags_git
(
void
)
void
test_
online
_fetch__no_tags_git
(
void
)
{
do_fetch
(
"git://github.com/libgit2/TestGitRepository.git"
,
GIT_REMOTE_DOWNLOAD_TAGS_NONE
,
3
);
}
void
test_
network
_fetch__no_tags_http
(
void
)
void
test_
online
_fetch__no_tags_http
(
void
)
{
do_fetch
(
"http://github.com/libgit2/TestGitRepository.git"
,
GIT_REMOTE_DOWNLOAD_TAGS_NONE
,
3
);
}
...
...
@@ -81,7 +81,7 @@ static void transferProgressCallback(const git_transfer_progress *stats, void *p
*
invoked
=
true
;
}
void
test_
network
_fetch__doesnt_retrieve_a_pack_when_the_repository_is_up_to_date
(
void
)
void
test_
online
_fetch__doesnt_retrieve_a_pack_when_the_repository_is_up_to_date
(
void
)
{
git_repository
*
_repository
;
bool
invoked
=
false
;
...
...
tests-clar/online/fetchhead.c
View file @
6443eaf2
...
...
@@ -11,7 +11,7 @@ static git_repository *g_repo;
static
git_remote
*
g_origin
;
static
git_clone_options
g_options
;
void
test_
fetchhead_network
__initialize
(
void
)
void
test_
online_fetchhead
__initialize
(
void
)
{
g_repo
=
NULL
;
...
...
@@ -20,7 +20,7 @@ void test_fetchhead_network__initialize(void)
cl_git_pass
(
git_remote_new
(
&
g_origin
,
NULL
,
"origin"
,
LIVE_REPO_URL
,
GIT_REMOTE_DEFAULT_FETCH
));
}
void
test_
fetchhead_network
__cleanup
(
void
)
void
test_
online_fetchhead
__cleanup
(
void
)
{
git_remote_free
(
g_origin
);
}
...
...
@@ -70,19 +70,19 @@ static void fetchhead_test_fetch(const char *fetchspec, const char *expected_fet
cl_assert
(
equals
);
}
void
test_
fetchhead_network
__wildcard_spec
(
void
)
void
test_
online_fetchhead
__wildcard_spec
(
void
)
{
fetchhead_test_clone
();
fetchhead_test_fetch
(
NULL
,
FETCH_HEAD_WILDCARD_DATA
);
}
void
test_
fetchhead_network
__explicit_spec
(
void
)
void
test_
online_fetchhead
__explicit_spec
(
void
)
{
fetchhead_test_clone
();
fetchhead_test_fetch
(
"refs/heads/first-merge:refs/remotes/origin/first-merge"
,
FETCH_HEAD_EXPLICIT_DATA
);
}
void
test_
fetchhead_network
__no_merges
(
void
)
void
test_
online_fetchhead
__no_merges
(
void
)
{
git_config
*
config
;
...
...
tests-clar/online/push.c
View file @
6443eaf2
...
...
@@ -125,7 +125,7 @@ static void verify_refs(git_remote *remote, expected_ref expected_refs[], size_t
git_vector_free
(
&
actual_refs
);
}
void
test_
network
_push__initialize
(
void
)
void
test_
online
_push__initialize
(
void
)
{
git_vector
delete_specs
=
GIT_VECTOR_INIT
;
size_t
i
;
...
...
@@ -205,7 +205,7 @@ void test_network_push__initialize(void)
printf
(
"GITTEST_REMOTE_URL unset; skipping push test
\n
"
);
}
void
test_
network
_push__cleanup
(
void
)
void
test_
online
_push__cleanup
(
void
)
{
if
(
_remote
)
git_remote_free
(
_remote
);
...
...
@@ -269,12 +269,12 @@ static void do_push(const char *refspecs[], size_t refspecs_len,
}
/* Call push_finish() without ever calling git_push_add_refspec() */
void
test_
network
_push__noop
(
void
)
void
test_
online
_push__noop
(
void
)
{
do_push
(
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
0
);
}
void
test_
network
_push__b1
(
void
)
void
test_
online
_push__b1
(
void
)
{
const
char
*
specs
[]
=
{
"refs/heads/b1:refs/heads/b1"
};
push_status
exp_stats
[]
=
{
{
"refs/heads/b1"
,
NULL
}
};
...
...
@@ -284,7 +284,7 @@ void test_network_push__b1(void)
exp_refs
,
ARRAY_SIZE
(
exp_refs
),
0
);
}
void
test_
network
_push__b2
(
void
)
void
test_
online
_push__b2
(
void
)
{
const
char
*
specs
[]
=
{
"refs/heads/b2:refs/heads/b2"
};
push_status
exp_stats
[]
=
{
{
"refs/heads/b2"
,
NULL
}
};
...
...
@@ -294,7 +294,7 @@ void test_network_push__b2(void)
exp_refs
,
ARRAY_SIZE
(
exp_refs
),
0
);
}
void
test_
network
_push__b3
(
void
)
void
test_
online
_push__b3
(
void
)
{
const
char
*
specs
[]
=
{
"refs/heads/b3:refs/heads/b3"
};
push_status
exp_stats
[]
=
{
{
"refs/heads/b3"
,
NULL
}
};
...
...
@@ -304,7 +304,7 @@ void test_network_push__b3(void)
exp_refs
,
ARRAY_SIZE
(
exp_refs
),
0
);
}
void
test_
network
_push__b4
(
void
)
void
test_
online
_push__b4
(
void
)
{
const
char
*
specs
[]
=
{
"refs/heads/b4:refs/heads/b4"
};
push_status
exp_stats
[]
=
{
{
"refs/heads/b4"
,
NULL
}
};
...
...
@@ -314,7 +314,7 @@ void test_network_push__b4(void)
exp_refs
,
ARRAY_SIZE
(
exp_refs
),
0
);
}
void
test_
network
_push__b5
(
void
)
void
test_
online
_push__b5
(
void
)
{
const
char
*
specs
[]
=
{
"refs/heads/b5:refs/heads/b5"
};
push_status
exp_stats
[]
=
{
{
"refs/heads/b5"
,
NULL
}
};
...
...
@@ -324,7 +324,7 @@ void test_network_push__b5(void)
exp_refs
,
ARRAY_SIZE
(
exp_refs
),
0
);
}
void
test_
network
_push__multi
(
void
)
void
test_
online
_push__multi
(
void
)
{
const
char
*
specs
[]
=
{
"refs/heads/b1:refs/heads/b1"
,
...
...
@@ -352,7 +352,7 @@ void test_network_push__multi(void)
exp_refs
,
ARRAY_SIZE
(
exp_refs
),
0
);
}
void
test_
network
_push__implicit_tgt
(
void
)
void
test_
online
_push__implicit_tgt
(
void
)
{
const
char
*
specs1
[]
=
{
"refs/heads/b1:"
};
push_status
exp_stats1
[]
=
{
{
"refs/heads/b1"
,
NULL
}
};
...
...
@@ -373,7 +373,7 @@ void test_network_push__implicit_tgt(void)
exp_refs2
,
ARRAY_SIZE
(
exp_refs2
),
0
);
}
void
test_
network
_push__fast_fwd
(
void
)
void
test_
online
_push__fast_fwd
(
void
)
{
/* Fast forward b1 in tgt from _oid_b1 to _oid_b6. */
...
...
@@ -407,7 +407,7 @@ void test_network_push__fast_fwd(void)
exp_refs_ff
,
ARRAY_SIZE
(
exp_refs_ff
),
0
);
}
void
test_
network
_push__force
(
void
)
void
test_
online
_push__force
(
void
)
{
const
char
*
specs1
[]
=
{
"refs/heads/b3:refs/heads/tgt"
};
push_status
exp_stats1
[]
=
{
{
"refs/heads/tgt"
,
NULL
}
};
...
...
@@ -433,7 +433,7 @@ void test_network_push__force(void)
exp_refs2_force
,
ARRAY_SIZE
(
exp_refs2_force
),
0
);
}
void
test_
network
_push__delete
(
void
)
void
test_
online
_push__delete
(
void
)
{
const
char
*
specs1
[]
=
{
"refs/heads/b1:refs/heads/tgt1"
,
...
...
@@ -486,7 +486,7 @@ void test_network_push__delete(void)
exp_refs_delete
,
ARRAY_SIZE
(
exp_refs_delete
),
0
);
}
void
test_
network
_push__bad_refspecs
(
void
)
void
test_
online
_push__bad_refspecs
(
void
)
{
/* All classes of refspecs that should be rejected by
* git_push_add_refspec() should go in this test.
...
...
@@ -504,7 +504,7 @@ void test_network_push__bad_refspecs(void)
}
}
void
test_
network
_push__expressions
(
void
)
void
test_
online
_push__expressions
(
void
)
{
/* TODO: Expressions in refspecs doesn't actually work yet */
const
char
*
specs_left_expr
[]
=
{
"refs/heads/b2~1:refs/heads/b2"
};
...
...
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