fsl wrapper

Check-in [f6851ec561]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Cleaned up the tests a little.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f6851ec561e5e5f7a5c3cd27e084e89429adcfea
User & Date: mrwellan 2012-05-01 23:39:31
Context
2012-05-02
15:34
added VERSION to header check-in: e29b0ba322 user: jmgedge tags: trunk, v1.22c
2012-05-01
23:39
Cleaned up the tests a little. check-in: f6851ec561 user: mrwellan tags: trunk
22:33
Closing the fork check-in: d07c519b39 user: mrwellan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to validation/run_test.sh.

3
4
5
6
7
8
9
10




11
12
13
14
15
16
set -e
set -u

# running in subshell gets you correct interleaving of stderr and stdout
(./tests.sh 2>&1) | tee test.log

if type logpro &> /dev/null;then
    logpro test.logpro test.html < test.log




    if type firefox &> /dev/null;then
	firefox test.html
    fi
else
    echo "Sorry, no logpro (you can get it from www.kiatoa.com/fossils/logpro), you'll have to read the log file validation/test.log yourself :)"
fi







|
>
>
>
>






3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
set -e
set -u

# running in subshell gets you correct interleaving of stderr and stdout
(./tests.sh 2>&1) | tee test.log

if type logpro &> /dev/null;then
    if logpro test.logpro test.html < test.log;then
       echo OVERALL PASS
    else
       echo OVERALL FAIL
    fi
    if type firefox &> /dev/null;then
	firefox test.html
    fi
else
    echo "Sorry, no logpro (you can get it from www.kiatoa.com/fossils/logpro), you'll have to read the log file validation/test.log yourself :)"
fi

Changes to validation/test.logpro.

12
13
14
15
16
17
18


19
20
21
22
23
(section "first user"            "first user"            "get repo by search")

(expect:required in "create area no path"   = 1 "Required error"    #/^ERROR:/)
(expect:required in "create area with path" = 1 "Area created"      #/^misc\s+\/tmp/)
(expect:required in "create of new fossil"  = 1 "Got PASS"          #/PASS/)
(expect:required in "getting of repo"       = 1 "Repository cloned" #/Repository cloned into test\/.fossil\/test.fossil/)



(expect:error    in "getting of repo"       = 0 "user already exists" #/user.*already exists/)
(expect:warning  in "LogFileBody"  = 0 "Any warning" #/warn/i)
(expect:error    in "LogFileBody"  = 0 "Any error"   #/err/i)
(expect:error    in "LogFileBody"  = 0 "Any fail"    #/fail/i)








>
>





12
13
14
15
16
17
18
19
20
21
22
23
24
25
(section "first user"            "first user"            "get repo by search")

(expect:required in "create area no path"   = 1 "Required error"    #/^ERROR:/)
(expect:required in "create area with path" = 1 "Area created"      #/^misc\s+\/tmp/)
(expect:required in "create of new fossil"  = 1 "Got PASS"          #/PASS/)
(expect:required in "getting of repo"       = 1 "Repository cloned" #/Repository cloned into test\/.fossil\/test.fossil/)

(expect:ignore in "LogFileBody" < 2 "No area provided warning" #/WARNING: no area provided, searching for first repo by name/)
(expect:ignore in "LogFileBody" < 2 "Non-error" #/^### Test create of new area with missing path .expect an error/)
(expect:error    in "getting of repo"       = 0 "user already exists" #/user.*already exists/)
(expect:warning  in "LogFileBody"  = 0 "Any warning" #/warn/i)
(expect:error    in "LogFileBody"  = 0 "Any error"   #/err/i)
(expect:error    in "LogFileBody"  = 0 "Any fail"    #/fail/i)

Changes to validation/tests.sh.

67
68
69
70
71
72
73

74

75
76
77
78
79
80
fsl add dir1
fsl ci -m "file1.txt and file2.txt committed"
fsl status
fsl mv -f dir1 dir2
fsl ci -m "Moved dir1 to dir2"
EOF


if [ -e test/dir2/dir1.1/file2.txt ];then echo PASS;else echo FAIL;fi

if [ -e test/dir2/file3.txt ];then echo PASS;else echo FAIL;fi

# fossil server -P 8090 $CH_AREA &
# $fslsrvpid=$!
# ....
# kill ${fslsrvpid}







>
|
>
|





67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
fsl add dir1
fsl ci -m "file1.txt and file2.txt committed"
fsl status
fsl mv -f dir1 dir2
fsl ci -m "Moved dir1 to dir2"
EOF

comment=" move to test/dir2/dir1.1/file2.txt"
if [ -e test/dir2/dir1.1/file2.txt ];then echo PASS$comment;else echo FAIL$comment;fi
comment=" move to test/dir2/file3.txt"
if [ -h test/dir2/file3.txt ];then echo PASS$comment;else echo FAIL$comment;fi

# fossil server -P 8090 $CH_AREA &
# $fslsrvpid=$!
# ....
# kill ${fslsrvpid}