Update test.sh for testing drogon_ctl
This commit is contained in:
parent
d0b9ed84ff
commit
7ffd47101f
|
@ -153,10 +153,10 @@
|
|||
"plugins": [{
|
||||
//name: The class name of the plugin
|
||||
//"name": "TestPlugin",
|
||||
//dependencies: Plugins that the plugin depends on. It's a null object by default.
|
||||
//dependencies: Plugins that the plugin depends on. It can be commented out
|
||||
"dependencies": [],
|
||||
//config: The configuration of the plugin. This json object is the parameter to initialize the plugin.
|
||||
//It's a null object by default.
|
||||
//It can be commented out
|
||||
"config": {
|
||||
"heartbeat_interval": 2
|
||||
}
|
||||
|
|
47
test.sh
47
test.sh
|
@ -24,4 +24,51 @@ if [ $? -ne 0 ];then
|
|||
exit -1
|
||||
fi
|
||||
|
||||
killall -9 webapp
|
||||
|
||||
#Test drogon_ctl
|
||||
|
||||
drogon_ctl create project drogon_test
|
||||
|
||||
cd drogon_test/controllers
|
||||
|
||||
drogon_ctl create controller Test::SimpleCtrl
|
||||
drogon_ctl create controller -h Test::HttpCtrl
|
||||
drogon_ctl create controller -w Test::WebsockCtrl
|
||||
|
||||
if [ ! -f "Test_SimpleCtrl.h" -o ! -f "Test_SimpleCtrl.cc" -o ! -f "Test_HttpCtrl.h" -o ! -f "Test_HttpCtrl.cc" -o ! -f "Test_WebsockCtrl.h" -o ! -f "Test_WebsockCtrl.cc" ];then
|
||||
echo "Failed to create controllers"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
cd ../filters
|
||||
|
||||
drogon_ctl create filter Test::TestFilter
|
||||
|
||||
if [ ! -f "Test_TestFilter.h" -o ! -f "Test_TestFilter.cc" ];then
|
||||
echo "Failed to create filters"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
cd ../build
|
||||
cmake ..
|
||||
|
||||
if [ $? -ne 0 ];then
|
||||
echo "Error in testing"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
make
|
||||
|
||||
if [ $? -ne 0 ];then
|
||||
echo "Error in testing"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ ! -f "drogon_test" ];then
|
||||
echo "Failed to build drogon_test"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
echo "Everything is ok!"
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue