Fossil SCM

Unset all likely system proxy variables before any tests run. Distribution CI pipelines often set a proxy, and that upsets many tests.

danshearer 2026-11-27 22:16 UTC test-suite-new
Commit b2b6abcb38016a80cfb08f0b256866d57058716671af103ccecbbd5c6f3f9a51
+4 -5
--- test/http.test
+++ test/http.test
@@ -17,16 +17,15 @@
1717
}
1818
if {![loopback_available]} {
1919
test_skip "the tests need a TCP connection over the loopback interface"
2020
}
2121
22
-# fossil must not use a proxy or a certificate store from the environment
23
-# of the test run, so these variables are unset until the end of this
24
-# file.
22
+# fossil must not use a certificate store from the environment of the
23
+# test run, so SSL_CERT_FILE and SSL_CERT_DIR are unset until the end of
24
+# this file.
2525
#
26
-foreach var {http_proxy HTTP_PROXY https_proxy HTTPS_PROXY all_proxy
27
- ALL_PROXY SSL_CERT_FILE SSL_CERT_DIR} {
26
+foreach var {SSL_CERT_FILE SSL_CERT_DIR} {
2827
if {[info exists env($var)]} {
2928
set httpSavedEnv($var) $env($var)
3029
unset env($var)
3130
}
3231
}
3332
--- test/http.test
+++ test/http.test
@@ -17,16 +17,15 @@
17 }
18 if {![loopback_available]} {
19 test_skip "the tests need a TCP connection over the loopback interface"
20 }
21
22 # fossil must not use a proxy or a certificate store from the environment
23 # of the test run, so these variables are unset until the end of this
24 # file.
25 #
26 foreach var {http_proxy HTTP_PROXY https_proxy HTTPS_PROXY all_proxy
27 ALL_PROXY SSL_CERT_FILE SSL_CERT_DIR} {
28 if {[info exists env($var)]} {
29 set httpSavedEnv($var) $env($var)
30 unset env($var)
31 }
32 }
33
--- test/http.test
+++ test/http.test
@@ -17,16 +17,15 @@
17 }
18 if {![loopback_available]} {
19 test_skip "the tests need a TCP connection over the loopback interface"
20 }
21
22 # fossil must not use a certificate store from the environment of the
23 # test run, so SSL_CERT_FILE and SSL_CERT_DIR are unset until the end of
24 # this file.
25 #
26 foreach var {SSL_CERT_FILE SSL_CERT_DIR} {
 
27 if {[info exists env($var)]} {
28 set httpSavedEnv($var) $env($var)
29 unset env($var)
30 }
31 }
32
--- test/tester.tcl
+++ test/tester.tcl
@@ -48,10 +48,19 @@
4848
}
4949
if {![file isfile $fossilexe]} {
5050
puts stderr "usage: tclsh [info script] FOSSIL ?OPTIONS? ?TESTFILE ...?"
5151
exit 1
5252
}
53
+
54
+# fossil must not use a proxy from the environment of the test run. A
55
+# test of a proxy variable sets it and unsets it again.
56
+#
57
+foreach var {http_proxy HTTP_PROXY https_proxy HTTPS_PROXY all_proxy
58
+ ALL_PROXY} {
59
+ unset -nocomplain ::env($var)
60
+}
61
+unset var
5362
5463
set dirty_ckout 1
5564
if {!$outside_fossil_repo} {
5665
set savedPwd [pwd]
5766
cd $testfiledir
5867
--- test/tester.tcl
+++ test/tester.tcl
@@ -48,10 +48,19 @@
48 }
49 if {![file isfile $fossilexe]} {
50 puts stderr "usage: tclsh [info script] FOSSIL ?OPTIONS? ?TESTFILE ...?"
51 exit 1
52 }
 
 
 
 
 
 
 
 
 
53
54 set dirty_ckout 1
55 if {!$outside_fossil_repo} {
56 set savedPwd [pwd]
57 cd $testfiledir
58
--- test/tester.tcl
+++ test/tester.tcl
@@ -48,10 +48,19 @@
48 }
49 if {![file isfile $fossilexe]} {
50 puts stderr "usage: tclsh [info script] FOSSIL ?OPTIONS? ?TESTFILE ...?"
51 exit 1
52 }
53
54 # fossil must not use a proxy from the environment of the test run. A
55 # test of a proxy variable sets it and unsets it again.
56 #
57 foreach var {http_proxy HTTP_PROXY https_proxy HTTPS_PROXY all_proxy
58 ALL_PROXY} {
59 unset -nocomplain ::env($var)
60 }
61 unset var
62
63 set dirty_ckout 1
64 if {!$outside_fossil_repo} {
65 set savedPwd [pwd]
66 cd $testfiledir
67
--- test/url.test
+++ test/url.test
@@ -25,19 +25,10 @@
2525
2626
if {![loopback_available]} {
2727
test_skip "the tests need a TCP connection over the loopback interface"
2828
}
2929
30
-# fossil must not use a proxy from the environment of the test run.
31
-foreach urlVar {http_proxy HTTP_PROXY https_proxy HTTPS_PROXY all_proxy
32
- ALL_PROXY} {
33
- if {[info exists env($urlVar)]} {
34
- set urlSavedEnv($urlVar) $env($urlVar)
35
- unset env($urlVar)
36
- }
37
-}
38
-
3930
test_setup
4031
set urlRepo [file join [pwd] .rep.fossil]
4132
set urlDir [pwd]
4233
4334
###############################################################################
@@ -1730,7 +1721,6 @@
17301721
unset env(URL_SSH_DIR)
17311722
}
17321723
17331724
###############################################################################
17341725
1735
-array set env [array get urlSavedEnv]
17361726
test_cleanup
17371727
--- test/url.test
+++ test/url.test
@@ -25,19 +25,10 @@
25
26 if {![loopback_available]} {
27 test_skip "the tests need a TCP connection over the loopback interface"
28 }
29
30 # fossil must not use a proxy from the environment of the test run.
31 foreach urlVar {http_proxy HTTP_PROXY https_proxy HTTPS_PROXY all_proxy
32 ALL_PROXY} {
33 if {[info exists env($urlVar)]} {
34 set urlSavedEnv($urlVar) $env($urlVar)
35 unset env($urlVar)
36 }
37 }
38
39 test_setup
40 set urlRepo [file join [pwd] .rep.fossil]
41 set urlDir [pwd]
42
43 ###############################################################################
@@ -1730,7 +1721,6 @@
1730 unset env(URL_SSH_DIR)
1731 }
1732
1733 ###############################################################################
1734
1735 array set env [array get urlSavedEnv]
1736 test_cleanup
1737
--- test/url.test
+++ test/url.test
@@ -25,19 +25,10 @@
25
26 if {![loopback_available]} {
27 test_skip "the tests need a TCP connection over the loopback interface"
28 }
29
 
 
 
 
 
 
 
 
 
30 test_setup
31 set urlRepo [file join [pwd] .rep.fossil]
32 set urlDir [pwd]
33
34 ###############################################################################
@@ -1730,7 +1721,6 @@
1721 unset env(URL_SSH_DIR)
1722 }
1723
1724 ###############################################################################
1725
 
1726 test_cleanup
1727

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button