Skip to content

Commit 367c41a

Browse files
derrickstoleedscho
authored andcommitted
t579*: split t5799 into several parts
Move the tests from t5799-gvfs-helper.sh into multiple scripts that can run in parallel. To ensure that the ports do not overlap, add a large multiplier on the instance when needing multiple ports within the same test (currently limited to the verb-specific cache servers). Signed-off-by: Derrick Stolee <stolee@gmail.com>
1 parent 68a5309 commit 367c41a

9 files changed

+1406
-1351
lines changed

t/lib-gvfs-helper.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ SERVER_LOG="$(pwd)"/OUT.server.log
6464
# Helper functions to compute port, pid-file, and log for a given
6565
# port increment. An increment of 0 (or empty) uses the base values.
6666
#
67+
# Ensure we don't overlap with any other test port by modifying a
68+
# significant bit.
6769
server_port () {
6870
local instance="${1:-0}"
69-
echo $(($GIT_TEST_GVFS_PROTOCOL_PORT + "$instance"))
71+
echo $(($GIT_TEST_GVFS_PROTOCOL_PORT + 10000 * $instance))
7072
}
7173

7274
server_pid_file () {
@@ -93,7 +95,7 @@ server_log_file () {
9395
#
9496
cache_server_url () {
9597
local instance="${1:-0}"
96-
local port=$(server_port "$instance")
98+
local port="$(server_port "$instance")"
9799
echo "http://127.0.0.1:$port/servertype/cache"
98100
}
99101

@@ -276,8 +278,8 @@ test_expect_success 'setup repos' '
276278
#
277279
stop_gvfs_protocol_server () {
278280
local instance="${1:-0}"
279-
local pid_file=$(server_pid_file "$instance")
280-
local log_file=$(server_log_file "$instance")
281+
local pid_file="$(server_pid_file "$instance")"
282+
local log_file="$(server_log_file "$instance")"
281283

282284
if ! test -f "$pid_file"
283285
then
@@ -314,9 +316,9 @@ stop_gvfs_protocol_server () {
314316
#
315317
start_gvfs_protocol_server () {
316318
local instance="${1:-0}"
317-
local port=$(server_port "$instance")
318-
local pid_file=$(server_pid_file "$instance")
319-
local log_file=$(server_log_file "$instance")
319+
local port="$(server_port "$instance")"
320+
local pid_file="$(server_pid_file "$instance")"
321+
local log_file="$(server_log_file "$instance")"
320322
#
321323
# Launch our server into the background in repo_src.
322324
#
@@ -391,7 +393,7 @@ start_gvfs_protocol_server_with_mayhem () {
391393
#
392394
verify_server_was_contacted () {
393395
local instance="${1:-0}"
394-
local log_file=$(server_log_file "$instance")
396+
local log_file="$(server_log_file "$instance")"
395397
grep -q "Connection from" "$log_file"
396398
}
397399

@@ -400,7 +402,7 @@ verify_server_was_contacted () {
400402
#
401403
verify_server_was_not_contacted () {
402404
local instance="${1:-0}"
403-
local log_file=$(server_log_file "$instance")
405+
local log_file="$(server_log_file "$instance")"
404406
! grep -q "Connection from" "$log_file"
405407
}
406408

t/meson.build

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,12 @@ integration_tests = [
744744
't5731-protocol-v2-bundle-uri-git.sh',
745745
't5732-protocol-v2-bundle-uri-http.sh',
746746
't5750-bundle-uri-parse.sh',
747-
't5799-gvfs-helper.sh',
747+
't5790-gvfs-helper-basic.sh',
748+
't5791-gvfs-helper-errors.sh',
749+
't5792-gvfs-helper-auth.sh',
750+
't5793-gvfs-helper-integration.sh',
751+
't5794-gvfs-helper-packfiles.sh',
752+
't5795-gvfs-helper-verb-cache.sh',
748753
't5801-remote-helpers.sh',
749754
't5802-connect-helper.sh',
750755
't5810-proto-disable-local.sh',

0 commit comments

Comments
 (0)