UnitTest: Tensor-src-tizensensor / Initial test cases
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 26 Nov 2019 09:42:06 +0000 (18:42 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Fri, 13 Dec 2019 04:07:53 +0000 (13:07 +0900)
commit14a21910b2cb738c4be32ca84c40736a7d0364b1
tree60384055e93e2d96c17d5ef32509d284d34396f2
parent265d5e9002512fffb024ee3fae2cef04dbedebcf
UnitTest: Tensor-src-tizensensor / Initial test cases

1. Unit tests are added.
2. dummy_sensor.c/h offers dummy Tizen sensor framework for unit tests,
where we cannot activate Tizen sensor framework daemon.
3. Bugs were found with the unit tests and they are fixed.
    - g_hash_table misuses
    - property configuration errors
    - frequency (framerate) handling
    - Clean up and configured-status handling
    - Mutex deadlock
    - Timestamp handling

Changes v1->v2:
- Use G_USEC_PER_SEC for readability, suggested by dongju.chae@samsung.com
Changes v2->v3:
- Added error-clear in testcase, suggested by dongju.chae@samsung.com
- Removed unnecessary code (residue of internal tests), suggested by jy1210.jung@samsung.com
Changes v3->v4:
- Added free ops for pipelines, removed duplicated codes, suggested by jy1210.jung@samsung.com

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
api/capi/src/nnstreamer-capi-pipeline.c
ext/nnstreamer/tensor_source/tensor_src_tizensensor.c
packaging/nnstreamer.spec
tests/tizen_capi/dummy_sensor.c [new file with mode: 0644]
tests/tizen_capi/dummy_sensor.h [new file with mode: 0644]
tests/tizen_capi/meson.build
tests/tizen_capi/sensor.h [new file with mode: 0644]
tests/tizen_capi/unittest_tizen_sensor.cpp [new file with mode: 0644]