14
14
> empty
15
15
16
16
test_expect_success ' start_command reports ENOENT' '
17
- test-run-command start-command-ENOENT ./does-not-exist
17
+ test-tool run-command start-command-ENOENT ./does-not-exist
18
18
'
19
19
20
20
test_expect_success ' run_command can run a command' '
21
21
cat hello-script >hello.sh &&
22
22
chmod +x hello.sh &&
23
- test-run-command run-command ./hello.sh >actual 2>err &&
23
+ test-tool run-command run-command ./hello.sh >actual 2>err &&
24
24
25
25
test_cmp hello-script actual &&
26
26
test_cmp empty err
@@ -31,7 +31,7 @@ test_expect_success !MINGW 'run_command can run a script without a #! line' '
31
31
cat hello-script
32
32
EOF
33
33
chmod +x hello &&
34
- test-run-command run-command ./hello >actual 2>err &&
34
+ test-tool run-command run-command ./hello >actual 2>err &&
35
35
36
36
test_cmp hello-script actual &&
37
37
test_cmp empty err
@@ -45,7 +45,7 @@ test_expect_success 'run_command does not try to execute a directory' '
45
45
EOF
46
46
47
47
PATH=$PWD/bin1:$PWD/bin2:$PATH \
48
- test-run-command run-command greet >actual 2>err &&
48
+ test-tool run-command run-command greet >actual 2>err &&
49
49
test_cmp bin2/greet actual &&
50
50
test_cmp empty err
51
51
'
@@ -62,15 +62,15 @@ test_expect_success POSIXPERM 'run_command passes over non-executable file' '
62
62
EOF
63
63
64
64
PATH=$PWD/bin1:$PWD/bin2:$PATH \
65
- test-run-command run-command greet >actual 2>err &&
65
+ test-tool run-command run-command greet >actual 2>err &&
66
66
test_cmp bin2/greet actual &&
67
67
test_cmp empty err
68
68
'
69
69
70
70
test_expect_success POSIXPERM ' run_command reports EACCES' '
71
71
cat hello-script >hello.sh &&
72
72
chmod -x hello.sh &&
73
- test_must_fail test-run-command run-command ./hello.sh 2>err &&
73
+ test_must_fail test-tool run-command run-command ./hello.sh 2>err &&
74
74
75
75
grep "fatal: cannot exec.*hello.sh" err
76
76
'
@@ -104,17 +104,17 @@ World
104
104
EOF
105
105
106
106
test_expect_success ' run_command runs in parallel with more jobs available than tasks' '
107
- test-run-command run-command-parallel 5 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
107
+ test-tool run-command run-command-parallel 5 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
108
108
test_cmp expect actual
109
109
'
110
110
111
111
test_expect_success ' run_command runs in parallel with as many jobs as tasks' '
112
- test-run-command run-command-parallel 4 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
112
+ test-tool run-command run-command-parallel 4 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
113
113
test_cmp expect actual
114
114
'
115
115
116
116
test_expect_success ' run_command runs in parallel with more tasks than jobs available' '
117
- test-run-command run-command-parallel 3 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
117
+ test-tool run-command run-command-parallel 3 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
118
118
test_cmp expect actual
119
119
'
120
120
@@ -128,7 +128,7 @@ asking for a quick stop
128
128
EOF
129
129
130
130
test_expect_success ' run_command is asked to abort gracefully' '
131
- test-run-command run-command-abort 3 false 2>actual &&
131
+ test-tool run-command run-command-abort 3 false 2>actual &&
132
132
test_cmp expect actual
133
133
'
134
134
@@ -137,14 +137,14 @@ no further jobs available
137
137
EOF
138
138
139
139
test_expect_success ' run_command outputs ' '
140
- test-run-command run-command-no-jobs 3 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
140
+ test-tool run-command run-command-no-jobs 3 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
141
141
test_cmp expect actual
142
142
'
143
143
144
144
test_trace () {
145
145
expect=" $1 "
146
146
shift
147
- GIT_TRACE=1 test-run-command " $@ " run-command true 2>&1 > /dev/null | \
147
+ GIT_TRACE=1 test-tool run-command " $@ " run-command true 2>&1 > /dev/null | \
148
148
sed ' s/.* run_command: //' > actual &&
149
149
echo " $expect true" > expect &&
150
150
test_cmp expect actual
0 commit comments