Fossil SCM
Create a repo and explicitly set the autosync setting so TH1 tests will run correctly regardless of the user's global setting.
Commit
3baa7e3dc195a888e1f99c31b591858960bf08ee
Parent
783a2a1b73082ca…
1 file changed
+15
+15
| --- test/th1.test | ||
| +++ test/th1.test | ||
| @@ -15,10 +15,25 @@ | ||
| 15 | 15 | # |
| 16 | 16 | ############################################################################ |
| 17 | 17 | # |
| 18 | 18 | # TH1 Commands |
| 19 | 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 | |
| 20 | 35 | |
| 21 | 36 | fossil test-th-eval --th-open-config "setting abc" |
| 22 | 37 | test th1-setting-1 {$RESULT eq ""} |
| 23 | 38 | |
| 24 | 39 | ############################################################################### |
| 25 | 40 |
| --- 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 |