pmarcinkiew / iotjs

Platform for Internet of Things with JavaScript http://www.iotjs.net
Other
0 stars 1 forks source link

Rework of iotjs_adc_read, advance TizenRT (ADC driver updated) #143

Closed tadziopazur closed 6 years ago

tadziopazur commented 6 years ago

Quiet test passes. ADC values from first port look good.

IoT.js-DCO-1.0-Signed-off-by: Tomasz Wozniak t.wozniak@samsung.com

pmarcinkiew commented 6 years ago

ADC test fails without verbose logging but it doesn't crash Artik053. It works with logging over UART active.

Quiet run full log:

TASH>>iotjs /rom/tools/check_test.js

>>>> run_pass
ADC setup
FAIL : test_adc.js (0.00s) 
ADC setup
PASS : test_assert.js (0.00s) 
SKIP : test_ble_advertisement.js   (reason : unsupported module by iotjs build)
SKIP : test_ble_setservices.js   (reason : unsupported module by iotjs build)
SKIP : test_ble_setservices_central.js   (reason : unsupported module by iotjs build)
PASS : test_buffer_builtin.js (0.00s) 
PASS : test_buffer.js (0.00s) 
Hello IoT.js!!
1
2
3
13
[1,2,3]
1 2 3
a 1 b 2 c 3
test null undefined
{
  "a": "123",
  "b": 123,
  "c": [
    1,
    2,
    3
  ]
}
Hello IoT.js!!
1
2
3
13
[1,2,3]
1 2 3
a 1 b 2 c 3
PASS : test_console.js (0.00s) 
SKIP : test_dgram_1_server_1_client.js   (reason : need to setup test environment)
SKIP : test_dgram_1_server_n_clients.js   (reason : need to setup test environment)
PASS : test_dgram_address.js (0.00s) 
SKIP : test_dgram_broadcast.js   (reason : need to setup test environment)
SKIP : test_dgram_multicast_membership_server.js   (reason : need to setup test environment)
SKIP : test_dgram_multicast_membership_client.js   (reason : need to setup test environment)
SKIP : test_dgram_multicast_set_multicast_loop.js   (reason : need to setup test environment)
SKIP : test_dgram_setttl_client.js   (reason : need to setup test environment)
SKIP : test_dgram_setttl_server.js   (reason : need to setup test environment)
PASS : test_dns.js (0.00s) 
PASS : test_dns_lookup.js (0.00s) 
PASS : test_events.js (0.00s) 
PASS : test_events_assert_emit_error.js (0.00s) 
PASS : test_events_uncaught_error.js (0.00s) 
PASS : test_fs_exists.js (0.00s) 
PASS : test_fs_exists_sync.js (0.00s) 
PASS : test_fs_fstat_dir.js (0.00s) 
PASS : test_fs_fstat_file.js (0.00s) 
PASS : test_fs_fstat_sync.js (0.00s) 
PASS : test_fs_mkdir_rmdir.js (0.00s) 
PASS : test_fs_open_close.js (0.00s) 
PASS : test_fs_readdir.js (0.00s) 
PASS : test_fs_readfile.js (0.00s) 
PASS : test_fs_readfile_sync.js (0.00s) 
PASS : test_fs_rename.js (0.00s) 
PASS : test_fs_rename_sync.js (0.00s) 
PASS : test_fs_stat.js (0.00s) 
PASS : test_fs_write.js (0.00s) 
PASS : test_fs_writefile.js (0.00s) 
PASS : test_fs_writefile_sync.js (0.00s) 
PASS : test_fs_writefile_unlink.js (0.00s) 
PASS : test_fs_writefile_unlink_sync.js (0.00s) 
PASS : test_fs_event.js (0.00s) 
PASS : test_fs_open_read.js (0.00s) 
PASS : test_fs_open_read_sync_1.js (0.00s) 
PASS : test_fs_open_read_sync_2.js (0.00s) 
PASS : test_fs_open_read_sync_3.js (0.00s) 
SKIP : test_gpio_input.js   (reason : needs hardware)
SKIP : test_gpio_output.js   (reason : need user input)
SKIP : test_https_get.js   (reason : unsupported module by iotjs build)
SKIP : test_https_post_status_codes.js   (reason : unsupported module by iotjs build)
SKIP : test_https_request_response.js   (reason : unsupported module by iotjs build)
SKIP : test_https_timeout.js   (reason : unsupported module by iotjs build)
SKIP : test_i2c.js   (reason : need to setup test environment)
SKIP : test_iotjs_promise.js   (reason : es2015 is off by default)
PASS : test_module_cache.js (0.00s) 
PASS : test_module_require.js (0.00s) 
PASS : test_net_1.js (0.00s) 
PASS : test_net_2.js (0.00s) 
PASS : test_net_3.js (0.00s) 
PASS : test_net_4.js (0.00s) 
PASS : test_net_5.js (0.00s) 
PASS : test_net_6.js (0.00s) 
PASS : test_net_7.js (0.00s) 
PASS : test_net_8.js (0.00s) 
PASS : test_net_9.js (0.00s) 
PASS : test_net_10.js (0.00s) 
PASS : test_net_connect.js (0.00s) 
PASS : test_net_headers.js (0.00s) 
PASS : test_net_http_get.js (0.00s) 
PASS : test_net_http_response_twice.js (0.00s) 
PASS : test_net_http_request_response.js (0.00s) 
PASS : test_net_http_status_codes.js (0.00s) 
PASS : test_net_httpclient_error.js (0.00s) 
PASS : test_net_httpclient_parse_error.js (0.00s) 
PASS : test_net_httpclient_timeout_1.js (0.00s) 
PASS : test_net_httpclient_timeout_2.js (0.00s) 
PASS : test_net_httpserver_timeout.js (0.00s) 
PASS : test_net_httpserver.js (0.00s) 
PASS : test_process.js (0.00s) 
PASS : test_process_chdir.js (0.00s) 
PASS : test_process_cwd.js (0.00s) 
PASS : test_process_exit.js (0.00s) 
PASS : test_process_experimental_off.js (0.00s) 
SKIP : test_process_experimental_on.js   (reason : needed if testing stablity is set with experimental)
PASS : test_process_next_tick.js (0.00s) 
PASS : test_process_readsource.js (0.00s) 
PASS : test_process_uncaught_order.js (0.00s) 
PASS : test_process_uncaught_simple.js (0.00s) 
SKIP : test_pwm_async.js   (reason : need to setup test environment)
SKIP : test_pwm_sync.js   (reason : need to setup test environment)
SKIP : test_spi.js   (reason : unsupported module by iotjs build)
PASS : test_stream.js (0.00s) 
PASS : test_stream_duplex.js (0.00s) 
PASS : test_timers_arguments.js (0.00s) 
PASS : test_timers_error.js (0.00s) 
PASS : test_timers_simple.js (0.00s) 
SKIP : test_uart.js   (reason : need to setup test environment)
PASS : test_uart_api.js (0.00s) 
PASS : test_util.js (0.00s) 

>>>> run_pass/issue
PASS : issue-133.js (0.00s) 
PASS : issue-137.js (0.00s) 
PASS : issue-198.js (0.00s) 
PASS : issue-223.js (0.00s) 
PASS : issue-266.js (0.00s) 
PASS : issue-323.js (0.00s) 
PASS : issue-816.js (0.00s) 
PASS : issue-1046.js (0.00s) 
PASS : issue-1077.js (0.00s) 
SKIP : issue-1101.js   (reason : need to setup test environment)
PASS : issue-1165.js (0.00s) 

>>>> run_fail
PASS : test_assert_equal.js (0.00s) 
PASS : test_assert_fail.js (0.00s) 
PASS : test_assert_notequal.js (0.00s) 
PASS : test_events_emit_error.js (0.00s) 
PASS : test_fs_callbacks_called.js (0.00s) 
PASS : test_iotjs_runtime_error.js (0.00s) 
PASS : test_iotjs_syntax_error.js (0.00s) 
PASS : test_module_require_invalid_file.js (0.00s) 
PASS : test_module_require_path_below_root.js (0.00s) 
PASS : test_process_exitcode_arg.js (0.00s) 
PASS : test_process_exitcode_var.js (0.00s) 
PASS : test_process_explicit_exit.js (0.00s) 
PASS : test_process_implicit_exit.js (0.00s) 

>>>> node/parallel
PASS : test-assert.js (0.00s) 
PASS : test-http-catch-uncaughtexception.js (0.00s) 
PASS : test-http-status-message.js (0.00s) 
PASS : test-http-write-head.js (0.00s) 
SKIP : test-net-bind-twice.js   (reason : cause TizenRT to hung and crash other tests)
PASS : test-net-end-without-connect.js (0.00s) 
PASS : test-net-keepalive.js (0.00s) 
PASS : test-timers-clear-null-does-not-throw-error.js (0.00s) 

>>>> hardware
SKIP : test_adc_echo.js   (reason : need to setup test environment)
SKIP : test_gpio_echo.js   (reason : need to setup test environment)
SKIP : test_pwm_echo.js   (reason : need to setup test environment)
SKIP : test_spi_echo.js   (reason : unsupported module by iotjs build)
SKIP : test_uart_echo.js   (reason : need to setup test environment)

finish all tests
PASS : 103
FAIL : 1
TIMEOUT : 0
SKIP : 31
iotjs thread end
TASH>>

Verbose run full log:

TASH>>
TASH>>cd /rom
TASH>>iotjs /rom/tools/check_test.js quiet=no

>>>> run_pass
ADC setup
ADC initialized
test1 start(read async test)
17
19
18
17
20
test1 complete
ADC setup
ADC initialized
test2 start(read sync test)
18
17
18
20
17
test2 complete
PASS : test_adc.js (0.00s) 
PASS : test_assert.js (0.00s) 
SKIP : test_ble_advertisement.js   (reason : unsupported module by iotjs build)
SKIP : test_ble_setservices.js   (reason : unsupported module by iotjs build)
SKIP : test_ble_setservices_central.js   (reason : unsupported module by iotjs build)
PASS : test_buffer_builtin.js (0.00s) 
PASS : test_buffer.js (0.00s) 
Hello IoT.js!!
1
2
3
13
[1,2,3]
1 2 3
a 1 b 2 c 3
test null undefined
{
  "a": "123",
  "b": 123,
  "c": [
    1,
    2,
    3
  ]
}
Hello IoT.js!!
1
2
3
13
[1,2,3]
1 2 3
a 1 b 2 c 3
PASS : test_console.js (0.00s) 
SKIP : test_dgram_1_server_1_client.js   (reason : need to setup test environment)
SKIP : test_dgram_1_server_n_clients.js   (reason : need to setup test environment)
PASS : test_dgram_address.js (0.00s) 
SKIP : test_dgram_broadcast.js   (reason : need to setup test environment)
SKIP : test_dgram_multicast_membership_server.js   (reason : need to setup test environment)
SKIP : test_dgram_multicast_membership_client.js   (reason : need to setup test environment)
SKIP : test_dgram_multicast_set_multicast_loop.js   (reason : need to setup test environment)
SKIP : test_dgram_setttl_client.js   (reason : need to setup test environment)
SKIP : test_dgram_setttl_server.js   (reason : need to setup test environment)
PASS : test_dns.js (0.00s) 
PASS : test_dns_lookup.js (0.00s) 
PASS : test_events.js (0.00s) 
PASS : test_events_assert_emit_error.js (0.00s) 
PASS : test_events_uncaught_error.js (0.00s) 
PASS : test_fs_exists.js (0.00s) 
PASS : test_fs_exists_sync.js (0.00s) 
PASS : test_fs_fstat_dir.js (0.00s) 
PASS : test_fs_fstat_file.js (0.00s) 
PASS : test_fs_fstat_sync.js (0.00s) 
PASS : test_fs_mkdir_rmdir.js (0.00s) 
PASS : test_fs_open_close.js (0.00s) 
PASS : test_fs_readdir.js (0.00s) 
PASS : test_fs_readfile.js (0.00s) 
PASS : test_fs_readfile_sync.js (0.00s) 
PASS : test_fs_rename.js (0.00s) 
PASS : test_fs_rename_sync.js (0.00s) 
PASS : test_fs_stat.js (0.00s) 
PASS : test_fs_write.js (0.00s) 
Pass
PASS : test_fs_writefile.js (0.00s) 
Pass
PASS : test_fs_writefile_sync.js (0.00s) 
Pass
PASS : test_fs_writefile_unlink.js (0.00s) 
PASS : test_fs_writefile_unlink_sync.js (0.00s) 
PASS : test_fs_event.js (0.00s) 
PASS : test_fs_open_read.js (0.00s) 
PASS : test_fs_open_read_sync_1.js (0.00s) 
PASS : test_fs_open_read_sync_2.js (0.00s) 
PASS : test_fs_open_read_sync_3.js (0.00s) 
SKIP : test_gpio_input.js   (reason : needs hardware)
SKIP : test_gpio_output.js   (reason : need user input)
SKIP : test_https_get.js   (reason : unsupported module by iotjs build)
SKIP : test_https_post_status_codes.js   (reason : unsupported module by iotjs build)
SKIP : test_https_request_response.js   (reason : unsupported module by iotjs build)
SKIP : test_https_timeout.js   (reason : unsupported module by iotjs build)
SKIP : test_i2c.js   (reason : need to setup test environment)
SKIP : test_iotjs_promise.js   (reason : es2015 is off by default)
PASS : test_module_cache.js (0.00s) 
PASS : test_module_require.js (0.00s) 
PASS : test_net_1.js (0.00s) 
PASS : test_net_2.js (0.00s) 
PASS : test_net_3.js (0.00s) 
PASS : test_net_4.js (0.00s) 
PASS : test_net_5.js (0.00s) 
PASS : test_net_6.js (0.00s) 
PASS : test_net_7.js (0.00s) 
PASS : test_net_8.js (0.00s) 
PASS : test_net_9.js (0.00s) 
Connected!
Timeout
PASS : test_net_10.js (0.00s) 
PASS : test_net_connect.js (0.00s) 
PASS : test_net_headers.js (0.00s) 
PASS : test_net_http_get.js (0.00s) 
PASS : test_net_http_response_twice.js (0.00s) 
PASS : test_net_http_request_response.js (0.00s) 
PASS : test_net_http_status_codes.js (0.00s) 
PASS : test_net_httpclient_error.js (0.00s) 
PASS : test_net_httpclient_parse_error.js (0.00s) 
PASS : test_net_httpclient_timeout_1.js (0.00s) 
PASS : test_net_httpclient_timeout_2.js (0.00s) 
PASS : test_net_httpserver_timeout.js (0.00s) 
PASS : test_net_httpserver.js (0.00s) 
PASS : test_process.js (0.00s) 
PASS : test_process_chdir.js (0.00s) 
/rom/test
PASS : test_process_cwd.js (0.00s) 
PASS : test_process_exit.js (0.00s) 
PASS : test_process_experimental_off.js (0.00s) 
SKIP : test_process_experimental_on.js   (reason : needed if testing stablity is set with experimental)
PASS : test_process_next_tick.js (0.00s) 
PASS : test_process_readsource.js (0.00s) 
PASS : test_process_uncaught_order.js (0.00s) 
PASS : test_process_uncaught_simple.js (0.00s) 
SKIP : test_pwm_async.js   (reason : need to setup test environment)
SKIP : test_pwm_sync.js   (reason : need to setup test environment)
SKIP : test_spi.js   (reason : unsupported module by iotjs build)
PASS : test_stream.js (0.00s) 
PASS : test_stream_duplex.js (0.00s) 
PASS : test_timers_arguments.js (0.00s) 
PASS : test_timers_error.js (0.00s) 
PASS : test_timers_simple.js (0.00s) 
SKIP : test_uart.js   (reason : need to setup test environment)
PASS : test_uart_api.js (0.00s) 
PASS : test_util.js (0.00s) 

>>>> run_pass/issue

PASS : issue-133.js (0.00s) 
hello world
1
19
null
true
false
undefined
0.09
NaN
function(){/* ecmascript */}
function(){/* ecmascript */}
{}
{
  "a": 1,
  "b": 2
}
[]
[1,2,3]
1+10=11
2+10=12
3+10=13
4+10=14
5+10=15
PASS : issue-137.js (0.00s) 
PASS : issue-198.js (0.00s) 
PASS : issue-223.js (0.00s) 
PASS : issue-266.js (0.00s) 
PASS : issue-323.js (0.00s) 
PASS : issue-816.js (0.00s) 
PASS : issue-1046.js (0.00s) 
PASS : issue-1077.js (0.00s) 
SKIP : issue-1101.js   (reason : need to setup test environment)
PASS : issue-1165.js (0.00s) 

>>>> run_fail
PASS : test_assert_equal.js (0.00s) 
PASS : test_assert_fail.js (0.00s) 
PASS : test_assert_notequal.js (0.00s) 
PASS : test_events_emit_error.js (0.00s) 
uncaughtException: AssertionError: {"actual":"pass"}
PASS : test_fs_callbacks_called.js (0.00s) 
PASS : test_iotjs_runtime_error.js (0.00s) 
PASS : test_iotjs_syntax_error.js (0.00s) 
PASS : test_module_require_invalid_file.js (0.00s) 
PASS : test_module_require_path_below_root.js (0.00s) 
PASS : test_process_exitcode_arg.js (0.00s) 
PASS : test_process_exitcode_var.js (0.00s) 
PASS : test_process_explicit_exit.js (0.00s) 
PASS : test_process_implicit_exit.js (0.00s) 

>>>> node/parallel
All OK
PASS : test-assert.js (0.00s) 
PASS : test-http-catch-uncaughtexception.js (0.00s) 
ok
PASS : test-http-status-message.js (0.00s) 
PASS : test-http-write-head.js (0.00s) 
SKIP : test-net-bind-twice.js   (reason : cause TizenRT to hung and crash other tests)
PASS : test-net-end-without-connect.js (0.00s) 
PASS : test-net-keepalive.js (0.00s) 
PASS : test-timers-clear-null-does-not-throw-error.js (0.00s) 

>>>> hardware
SKIP : test_adc_echo.js   (reason : need to setup test environment)
SKIP : test_gpio_echo.js   (reason : need to setup test environment)
SKIP : test_pwm_echo.js   (reason : need to setup test environment)
SKIP : test_spi_echo.js   (reason : unsupported module by iotjs build)
SKIP : test_uart_echo.js   (reason : need to setup test environment)

finish all tests
PASS : 104
FAIL : 0
TIMEOUT : 0
SKIP : 31
iotjs thread end
TASH>>
pmarcinkiew commented 6 years ago

It is not perfect solution but ADC test fail is much better than deadlock.