zephyr/tests/net/lib/mqtt_packet
Kumar Gala 9127c4b3b1 tests: Cleanup converting int result to string
Introduce TC_RESULT_TO_STR to convert from an integer test result to a
string like "PASS", "FAIL", "SKIP".  Do this to remove the defines of
PASS/FAIL/SKIP since those names might get used by other code and to
have a single consistent way of doing the conversion.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-06-29 11:53:59 -05:00
..
src tests: Cleanup converting int result to string 2018-06-29 11:53:59 -05:00
CMakeLists.txt
README tests: mqtt_packet: fix README and adapt for cmake 2018-01-11 12:50:14 -05:00
prj.conf tests: net: Increase the stack size of frdm-k64f 2018-06-05 10:30:30 -04:00
testcase.yaml tests: net: style, tag, and category fixes 2018-04-25 14:18:15 +05:30

README

MQTT Library Test
-----------------

This MQTT application tests the low-level API for packet handling.
No network activity is involved in this test, so ** theoretically **
it can be run on almost any board already supported by Zephyr and
with enough RAM/ROM.

Build and Run
-------------

* QEMU x86

  Build & run:
  mkdir build; cd build
  cmake -DBOARD=qemu_x86 ..
  make run

* Arduino 101

  Build:
  mkdir build; cd build
  cmake -DBOARD=arduino_101 ..
  make run

  Flashing:
  sudo dfu-util -a x86_app -D outdir/arduino_101/zephyr.bin

  For more information about this board, see:
  https://www.zephyrproject.org/doc/boards/x86/arduino_101/doc/board.html

* NXP Freedom-K64F (frdm-k64f)

  Build:
  mkdir build; cd build
  cmake -DBOARD=frdm_k64f ..
  make run

  Firmware version:
  Version: 0226
  Build:   Aug 24 2015 17:06:30
  Git Commit SHA: 27a236b9fe39c674a703c5c89655fbd26b8e27e1
  Git Local mods: Yes

  For more information about this board, see:
  https://developer.mbed.org/platforms/frdm-k64f/

Sample Output
-------------

To exit from QEMU enter: 'CTRL+a, x'
[QEMU] CPU: qemu32
tc_start() - MQTT Library test
[PASS] 1 - CONNECT, new session, zeros
[PASS] 2 - CONNECT, new session, zeros and keep alive = 365
[PASS] 3 - CONNECT, new session, will
[PASS] 4 - CONNECT, new session, will retain
[PASS] 5 - CONNECT, new session, will qos = 1
[PASS] 6 - CONNECT, new session, will qos = 1, will retain
[PASS] 7 - CONNECT, new session, username and password
[PASS] 8 - DISCONNECT
[PASS] 9 - PUBLISH, qos = 0
[PASS] 10 - PUBLISH, retain = 1
[PASS] 11 - PUBLISH, retain = 1, qos = 1
[PASS] 12 - PUBLISH, qos = 2
[PASS] 13 - SUBSCRIBE, one topic, qos = 0
[PASS] 14 - SUBSCRIBE, one topic, qos = 1
[PASS] 15 - SUBSCRIBE, one topic, qos = 2
[PASS] 16 - SUBACK, one topic, qos = 0
[PASS] 17 - SUBACK, one topic, qos = 1
[PASS] 18 - SUBACK, one topic, qos = 2
[PASS] 19 - PINGREQ
[PASS] 20 - PINGRESP
[PASS] 21 - PUBACK
[PASS] 22 - PUBREC
[PASS] 23 - PUBREL
[PASS] 24 - PUBCOMP
[PASS] 25 - UNSUBACK
===================================================================
PASS - main.
===================================================================
PROJECT EXECUTION SUCCESSFUL