Skip to content

Commit d56e15c

Browse files
update releasetest
1 parent b915dd8 commit d56e15c

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

tools/test/releasetest/releasetest

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,20 @@ row_count()
1616
echo "SELECT COUNT(1) FROM blog;" | sqlite3 $DBFILE
1717
}
1818

19+
# Cleanup
20+
cleanup()
21+
{
22+
# Cleanup
23+
cd $APPROOT
24+
$TREEFROG -k abort
25+
26+
cd $BASEDIR
27+
rm -rf $WORKDIR
28+
rm -rf $APPNAME
29+
}
30+
1931
## Main ##
32+
trap 'cleanup' 2 3 15 EXIT
2033

2134
# Create app
2235
cd $BASEDIR
@@ -40,7 +53,7 @@ make || exit
4053
# Start Check
4154
$TREEFROG -e dev -d || exit
4255
sleep 1
43-
$TREEFROG -k abort || exit
56+
$TREEFROG -k stop || exit
4457
sleep 1
4558
$TREEFROG -e dev -d || exit
4659
sleep 1
@@ -49,9 +62,7 @@ sleep 1
4962
mkdir -p $WORKDIR
5063
cd $WORKDIR
5164
wget http://localhost:8800/blog/index || exit
52-
wget http://localhost:8800/blog/entry || exit
53-
wget http://localhost:8800/fuga/index || exit
54-
65+
wget http://localhost:8800/blog/create || exit
5566

5667
# POST method
5768
# create1
@@ -82,14 +93,6 @@ curl --data-urlencode 'dummy' http://localhost:8800/blog/remove/2 > remove2 |
8293
[ `row_count` = "0" ] || exit
8394

8495

85-
# Cleanup
86-
cd $APPROOT
87-
$TREEFROG -k stop || exit
88-
89-
cd $BASEDIR
90-
rm -rf $WORKDIR
91-
rm -rf $APPNAME
92-
9396
echo
9497
echo "Test completed."
9598
echo "Congratulations!"

0 commit comments

Comments
 (0)