diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-08-05 23:09:46 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-08-05 23:09:46 +1200 |
commit | ff5f91b7f9cba42485bbe0f4e2387c7756228704 (patch) | |
tree | e22a36468446d73ffef11e774cb1701c7b51f328 /tools/test.sh | |
parent | c6a0dd4c75473b8ef97bd7fb914ee682435d32fd (diff) | |
download | trackermap-server-ff5f91b7f9cba42485bbe0f4e2387c7756228704.tar.gz trackermap-server-ff5f91b7f9cba42485bbe0f4e2387c7756228704.tar.bz2 trackermap-server-ff5f91b7f9cba42485bbe0f4e2387c7756228704.zip |
Update testing scripts again
Diffstat (limited to 'tools/test.sh')
-rwxr-xr-x | tools/test.sh | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tools/test.sh b/tools/test.sh index fe10b7199..31506e0ad 100755 --- a/tools/test.sh +++ b/tools/test.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # This test data assumes three devices exist: @@ -9,16 +9,14 @@ # ('Test Device 3', 123456); # # Test data: -# ids - 123456789012345 (31), 123456789012 (1), 123456 (2) +# ids - 123456789012345 (30), 123456789012 (1), 123456 (2) # time - 12:00 + X min (where X is port number - 5000) # # To verify test check database entries # -# Warning: Not all shells support "echo -e" -# test_protocol () { - echo -n -e $3 | nc localhost $1 + echo -n -e $3 | nc localhost $1 &>/dev/null if [ $? -ne 0 ] then printf "%-4s %-15s FAIL\n" $1 $2 @@ -34,7 +32,6 @@ test_protocol 5004 "gl200" "+RESP:GTFRI,020102,123456789012345,,0,0,1,1,0.0,0,0. test_protocol 5005 "t55" "\$PGID,123456789012345*0F\r\n\$GPRMC,120500.000,A,6000.0000,N,13000.0000,E,0.00,0.00,010112,,*33\r\n" test_protocol 5006 "xexun" "111111120009,+436763737552,GPRMC,120600.000,A,6000.0000,N,13000.0000,E,0.00,0.00,010112,,,A*68,F,, imei:123456789012345,04,481.2,F:4.15V,0,139,2689,232,03,2725,0576\n" test_protocol 5007 "totem" "\$\$B3123456789012345|AA\$GPRMC,120700.000,A,6000.0000,N,13000.0000,E,0.00,,010112,,,A*74|01.8|01.0|01.5|000000000000|20120403234603|14251914|00000000|0012D888|0000|0.0000|3674|940B\r\n" -test_protocol 5008 "enfora" "\x00\x71\x00\x04\x02\x00 123456789012345 13 \$GPRMC,120800.00,A,6000.000000,N,13000.000000,E,0.0,0.0,010112,,,A*52\r\n" test_protocol 5009 "meiligao" "\$\$\x00\x60\x12\x34\x56\xFF\xFF\xFF\xFF\x99\x55120900.000,A,6000.0000,N,13000.0000,E,0.00,,010112,,*1C|11.5|194|0000|0000,0000\x69\x62\x0D\x0A" test_protocol 5011 "st210" "SA200STT;123456;042;20120101;12:11:00;16d41;-15.618767;-056.083214;000.011;000.00;11;1;41557;12.21;000000;1;3205\r" test_protocol 5013 "h02" "*HQ,123456789012345,V1,121300,A,6000.0000,N,13000.0000,E,0.00,0.00,010112,ffffffff,000000,000000,000000,000000#" @@ -45,7 +42,7 @@ test_protocol 5017 "pt502" "\$POS,123456,121700.000,A,6000.0000,N,13000.0000,E,0 test_protocol 5018 "tr20" "%%123456789012345,A,120101121800,N6000.0000E13000.0000,0,000,0,01034802,150,[Message]\r\n" test_protocol 5020 "meitrack" "\$\$d138,123456789012345,AAA,35,60.000000,130.000000,120101122000,A,7,18,0,0,0,49,3800,24965,510|10|0081|4F4F,0000,000D|0010|0012|0963|0000,,*BF\r\n" test_protocol 5024 "megastek" "STX,102110830074542,\$GPRMC,122400.000,A,6000.0000,N,13000.0000,E,0.00,0.00,010112,,,A*64,F,LowBattery,imei:123456789012345,03,113.1,Battery=24%,,1,460,01,2531,647E;57\r\n" -test_protocol 5026 "gpsgate" "\$FRLIN,IMEI,123456789012345,*7B\r\n\$GPRMC,122600.000,A,6000.00000,N,13000.00000,E,0.000,0.0,010112,,*0A" +test_protocol 5026 "gpsgate" "\$FRLIN,IMEI,123456789012345,*7B\r\n\$GPRMC,122600.000,A,6000.00000,N,13000.00000,E,0.000,0.0,010112,,*0A\r\n" test_protocol 5030 "tlt2h" "#123456789012345#V500#0000#AUTO#1\r\n#\$GPRMC,123000.000,A,6000.0000,N,13000.0000,E,0.00,0.00,010112,,,D*70\r\n##" test_protocol 5031 "syrus" ">REV481669045060+6000000-1300000000000012;ID=123456789012345<" test_protocol 5032 "wondex" "123456789012345,20120101123200,130.000000,60.000000,0,000,0,0,2\r\n" |