68 Commits

Author SHA1 Message Date
Stefan Wahren
107d44b7e9 build: temporary revert to autotools (#174)
As long as cmake doesn't generate suitable deb packages, we need to
switch back :(
2020-07-19 12:58:27 +02:00
Fredrik Skold
e89f929f6c Fix bug, test script should accept both 1 and 2 arguments (#165)
Usefull when placing the output in another directory.
2020-07-08 15:47:03 +02:00
Fredrik Skold
69019312c9 Enforce tests execute ok (#165) 2020-07-08 15:47:03 +02:00
Fredrik Skold
2d09cfc41d Move invalid_length*.hex to test/unsupported-frames (#165) 2020-07-08 15:47:03 +02:00
Stefan Wahren
446cf41a2a Move RVD235 out of unsupported
Especially after the recent changes, we can consider Siemens RVD235 as
supported.
2020-07-08 12:48:26 +02:00
Stefan Wahren
ec4bff91db Remove duplicate
rvd235.hex is the same as siemens_rvd235.hex
2020-07-08 12:48:26 +02:00
Stefan Wahren
fe2b4ec024 Add more test frames
Aquametro CALEC MB (Heat)
Eastron SDM630 (Electricity)
Sensus PolluCom E (Heat)
Tecson (Oil)
2020-07-08 11:54:38 +02:00
Stefan Wahren
8d781ad240 Improve product strings for Aquametro and Sensus 2020-07-08 11:54:38 +02:00
Fredrik Skold
67ea2d3900 Implement all of VIF extensions for 0xFB (#166) 2020-07-08 11:31:13 +02:00
Anders Wennmo
5b26e62f55 Implement all of VIF extensions for 0xFD (#166) 2020-07-08 11:31:13 +02:00
Stefan Wahren
6c1e2026d6 Update normalized XML files
This updates the affected XML files after the recent fixes to the VIF
description.
2020-07-07 10:17:39 +02:00
Stefan Wahren
9799794213 Add normalized XML files of test frames 2020-07-06 12:55:05 +02:00
Stefan Wahren
bf177d1fe7 Also generate normalized XML
In order to increase the test coverage also generate the normalized version
of XML output.
2020-07-06 12:06:39 +02:00
Stefan Wahren
17a73287c2
Improve BCD decoding (#167)
* Introduce mbus_data_bcd_decode_hex

The convert function mbus_data_bcd_decode (BCD to decimal) suffers from
information loss in case of hexacimal digits. So introduce a new function
mbus_data_bcd_decode_hex (BCD to hexadecimal), which isn't affected and
use this for default XML output. But keep mbus_data_bcd_decode for
normalized output.
2020-06-28 10:28:40 +02:00
Stefan Wahren
baf03e2a47
Merge pull request #151 from gocarlos/feat--add-cmake-support
build: add cmake support
2020-04-24 20:18:09 +02:00
Carlos Gomes Martinho
f569816788 chore: make path to tests optional 2020-04-24 09:55:01 +02:00
Carlos Gomes Martinho
ee3a69e5df docs: add better usage to generate xml script 2020-04-14 11:22:40 +02:00
Carlos Gomes Martinho
9f9c7a5dbf
fix: unit tests 2020-04-14 11:01:07 +02:00
Carlos Gomes Martinho
bd2fa5759b build: remove old build system 2020-03-31 20:31:18 +02:00
Carlos Gomes Martinho
d96dcfad09 build: add cmake support
feat: add cmake support

chore: remove old code

revert: remove mbus_data_record_unit

build: do not break existing building system
2020-03-31 20:30:18 +02:00
Carlos Gomes Martinho
6edab86078
refactor: clean up some compiler warnings (#152) 2020-03-21 10:50:33 +01:00
Stefan Wahren
3a2357324d Update test frames to new date/time decoding 2016-07-23 09:38:57 +00:00
strongly-typed
b9bec04027 Tests: Add XML files for hexdumps of error frames. 2016-05-09 01:36:50 +02:00
strongly-typed
9bf9f4bbf0 Tests: Add XML files for hexdumps added in a659ca0.
It is unclear if these interpretations are correct.
But at least it can spot regressions in future commits.
2016-05-09 01:36:27 +02:00
strongly-typed
c59f584937 Tests: Update XML files fixes in a8eaced. 2016-05-09 01:28:08 +02:00
strongly-typed
ab59b56a49 Tests: add product strings added with ed87f62 2016-05-09 01:28:08 +02:00
Aarno Aukia
b6cbb1de1e merge rscada/master with arska/feature-ignoretestbinaries 2016-03-25 23:20:34 +01:00
Stefan Wahren
a659ca0494 Add some hexdumps of M-Bus frames 2016-02-06 11:06:03 +00:00
Aarno Aukia
c11ef4b830 add XML output for existing test cases 2016-02-05 14:42:15 +01:00
Aarno Aukia
9fb9f30a58 add new test cases from my lab 2016-02-05 14:42:15 +01:00
Aarno Aukia
7eaadad124 update existing test-case-output with the changes introduced in 781736fe4cbc78d4a14dc486b446dd813fd5aa20 2016-02-05 14:42:15 +01:00
Aarno Aukia
0751e0d88f remove exec bit from test cases 2016-02-05 14:42:12 +01:00
Aarno Aukia
b55422b034 move error test cases to their own folder 2016-02-05 14:41:05 +01:00
Aarno Aukia
89195f627a retab and remove trailing whitespace 2016-02-05 14:36:19 +01:00
Dirk Zenker
00d0fc0aaf add hex dump for regression tests as requested by lategoodbye 2014-03-13 13:33:28 +01:00
Dirk Zenker
5f0b5d5dd1 Beautify: replace tabs with spaces and remove trailing spaces 2014-02-24 15:20:42 +01:00
Stefan Wahren
a32e325979 Update XML files because of storage number, tariff and
device
2013-11-07 12:06:09 +01:00
Stefan Wahren
887d6a2914 Add test frame for GMC EMMOD 206 2013-10-31 23:05:39 +01:00
Stefan Wahren
6ffa521473 Update XML after fixing bug with signed integer 2013-10-31 22:27:48 +01:00
Stefan Wahren
55d4c0fba2 Remove trailing whitespace
Signed-off-by: Stefan Wahren <info@lategoodbye.de>
2013-09-13 17:53:33 +02:00
Stefan Wahren
c8aaa8dc32 Add new test frames from Elster Falcon and Relay Padpuls
Signed-off-by: Stefan Wahren <info@lategoodbye.de>
2013-08-03 16:23:20 +02:00
Stefan Wahren
fb84fd11a8 Add additional check if directory is empty or hex file doesn't exists 2013-08-03 15:51:34 +02:00
Stefan Wahren
55c2bf0dee Add normalized values option -n
Add file pointer check after fread
2013-07-17 22:21:07 +02:00
Robert Johansson
8f61edc85d remove the CUnit based unit test, since it does not work well (does not show which test that is failing...). instead we can use Stefan's nice generate-xml.sh which show exactly which test frames fails and the diff. 2013-07-05 00:12:38 +09:00
Robert Johansson
87cadafea0 updated XML files for test frames 2013-07-05 00:07:03 +09:00
Stefan Wahren
3381d1b41d test cases for invalid telegrams
- too short fixed data length (invalid_length2.hex)
- premature end of record at data (premature_end_of_data1.hex,
premature_end_of_data2.hex)
- premature end of record at DIF (premature_end_of_dif1.hex,
premature_end_of_dif2.hex)
- premature end of record at variable length VIF
(premature_end_of_var_vif1.hex)
- premature end of record at VIF (premature_end_of_vif1.hex)
- too long variable length VIF (too_long_var_vif.hex)
- too many DIFE (too_many_dife.hex)
- too many VIFE (too_many_vife.hex)
- too short variable header (too_short_header.hex)
2013-06-21 08:45:22 +02:00
Stefan Wahren
ee209023b8 fix memleaks
avoid memleak if memory is full
fix "memleak" at the end of mbus_parse_hex
2013-05-04 19:17:27 +02:00
Stefan Wahren
3935b4013e make parseable for splint
- replace non standard u_char with unsigned char (ANSI)
- advice splint to ignore variadic macros
- move declarations from the middle to top of functions (C90)
- replace local library includes <> to ""
2013-05-04 18:14:18 +02:00
Jakob Skov-Pedersen
363f59a149 Ignore filler DIF (= 0x2F) 2013-03-11 09:27:16 +01:00
Stefan Wahren
9c9c0201f9 add exploit for invalid length 2012-12-29 11:57:13 +01:00