1d4afb5ceSopenharmony_ci# lws api test lws_struct JSON 2d4afb5ceSopenharmony_ci 3d4afb5ceSopenharmony_ciDemonstrates how to use and performs selftests for lws_struct 4d4afb5ceSopenharmony_ciJSON serialization and deserialization 5d4afb5ceSopenharmony_ci 6d4afb5ceSopenharmony_ci## build 7d4afb5ceSopenharmony_ci 8d4afb5ceSopenharmony_ci``` 9d4afb5ceSopenharmony_ci $ cmake . && make 10d4afb5ceSopenharmony_ci``` 11d4afb5ceSopenharmony_ci 12d4afb5ceSopenharmony_ci## usage 13d4afb5ceSopenharmony_ci 14d4afb5ceSopenharmony_ciCommandline option|Meaning 15d4afb5ceSopenharmony_ci---|--- 16d4afb5ceSopenharmony_ci-d <loglevel>|Debug verbosity in decimal, eg, -d15 17d4afb5ceSopenharmony_ci 18d4afb5ceSopenharmony_ci``` 19d4afb5ceSopenharmony_ci $ ./lws-api-test-lws_struct-json 20d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2529] USER: LWS API selftest: lws_struct JSON 21d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2625] NOTICE: main: ++++++++++++++++ test 1 22d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2812] NOTICE: builder.hostname = 'learn', timeout = 1800, targets (2) 23d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2822] NOTICE: target.name 'target1' (target 0x543a830) 24d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2824] NOTICE: target.name 'target2' (target 0x543a860) 25d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2826] NOTICE: main: .... strarting serialization of test 1 26d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2899] NOTICE: ser says 1 27d4afb5ceSopenharmony_ci{"schema":"com-warmcat-sai-builder","hostname":"learn","nspawn_timeout":1800,"targets":[{"name":"target1"},{"name":"target2"}]} 28d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2929] NOTICE: main: ++++++++++++++++ test 2 29d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2932] NOTICE: builder.hostname = 'learn', timeout = 0, targets (3) 30d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2932] NOTICE: target.name 'target1' (target 0x543b060) 31d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2933] NOTICE: target.name 'target2' (target 0x543b090) 32d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2933] NOTICE: target.name 'target3' (target 0x543b0c0) 33d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2934] NOTICE: main: .... strarting serialization of test 2 34d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2935] NOTICE: ser says 1 35d4afb5ceSopenharmony_ci{"schema":"com-warmcat-sai-builder","hostname":"learn","nspawn_timeout":0,"targets":[{"name":"target1"},{"name":"target2"},{"name":"target3"}]} 36d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2940] NOTICE: main: ++++++++++++++++ test 3 37d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2959] NOTICE: builder.hostname = 'learn', timeout = 1800, targets (2) 38d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2960] NOTICE: target.name 'target1' (target 0x543b450) 39d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2961] NOTICE: child 0x543b480, target.child.somename 'abc' 40d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2961] NOTICE: target.name 'target2' (target 0x543b490) 41d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2962] NOTICE: main: .... strarting serialization of test 3 42d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2969] NOTICE: ser says 1 43d4afb5ceSopenharmony_ci{"schema":"com-warmcat-sai-builder","hostname":"learn","nspawn_timeout":1800,"targets":[{"name":"target1","child":{"somename":"abc"}},{"name":"target2"}]} 44d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2970] NOTICE: main: ++++++++++++++++ test 4 45d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2971] NOTICE: builder.hostname = 'learn', timeout = 1800, targets (0) 46d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2971] NOTICE: main: .... strarting serialization of test 4 47d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2973] NOTICE: ser says 1 48d4afb5ceSopenharmony_ci{"schema":"com-warmcat-sai-builder","hostname":"learn","nspawn_timeout":1800} 49d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2974] NOTICE: main: ++++++++++++++++ test 5 50d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2978] NOTICE: builder.hostname = '', timeout = 0, targets (0) 51d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2979] NOTICE: main: .... strarting serialization of test 5 52d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2980] NOTICE: ser says 1 53d4afb5ceSopenharmony_ci{"schema":"com-warmcat-sai-builder","hostname":"","nspawn_timeout":0} 54d4afb5ceSopenharmony_ci[2019/03/30 22:09:09:2982] USER: Completed: PASS 55d4afb5ceSopenharmony_ci``` 56d4afb5ceSopenharmony_ci 57