Fossil SCM

Create a repo and explicitly set the autosync setting so TH1 tests will run correctly regardless of the user's global setting.

joel 2014-02-15 06:14 trunk
Commit 3baa7e3dc195a888e1f99c31b591858960bf08ee
1 file changed +15
--- test/th1.test
+++ test/th1.test
@@ -15,10 +15,25 @@
1515
#
1616
############################################################################
1717
#
1818
# TH1 Commands
1919
#
20
+
21
+catch {exec $::fossilexe info} res
22
+puts res=$res
23
+if {![regexp {use --repository} $res]} {
24
+ puts stderr "Cannot run this test within an open checkout"
25
+ return
26
+}
27
+
28
+# Fossil will write data on $HOME, running 'fossil new' here.
29
+# We need not to clutter the $HOME of the test caller.
30
+set env(HOME) [pwd]
31
+
32
+fossil new rep.fossil
33
+fossil open rep.fossil
34
+fossil setting autosync 1
2035
2136
fossil test-th-eval --th-open-config "setting abc"
2237
test th1-setting-1 {$RESULT eq ""}
2338
2439
###############################################################################
2540
--- test/th1.test
+++ test/th1.test
@@ -15,10 +15,25 @@
15 #
16 ############################################################################
17 #
18 # TH1 Commands
19 #
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
21 fossil test-th-eval --th-open-config "setting abc"
22 test th1-setting-1 {$RESULT eq ""}
23
24 ###############################################################################
25
--- test/th1.test
+++ test/th1.test
@@ -15,10 +15,25 @@
15 #
16 ############################################################################
17 #
18 # TH1 Commands
19 #
20
21 catch {exec $::fossilexe info} res
22 puts res=$res
23 if {![regexp {use --repository} $res]} {
24 puts stderr "Cannot run this test within an open checkout"
25 return
26 }
27
28 # Fossil will write data on $HOME, running 'fossil new' here.
29 # We need not to clutter the $HOME of the test caller.
30 set env(HOME) [pwd]
31
32 fossil new rep.fossil
33 fossil open rep.fossil
34 fossil setting autosync 1
35
36 fossil test-th-eval --th-open-config "setting abc"
37 test th1-setting-1 {$RESULT eq ""}
38
39 ###############################################################################
40

Keyboard Shortcuts

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