Skip to content

RTC time conversion test - reduce test execution time. #5802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2018

Conversation

mprse
Copy link
Contributor

@mprse mprse commented Jan 8, 2018

Description

Reduce number of tested cases as follows:

For each of the following years test example time of the first and last day of each month:

  • first - 1970
  • example not leap year (not divisible by 4)
  • example leap year (divisible by 4 and by 100 and by 400)
  • example leap year (divisible by 4 and not by 100)
  • example not leap year (divisible by 4 and by 100)
  • last fully supported - 2105

Test execution time on K64F is now ~39 sec.

Status

READY

Migrations

NO

…reduce test execution time.

For each of the following years test example time of the first and last day of each month:
- first - 1970
- example not leap year (not divisible by 4)
- example leap year (divisible by 4 and by 100 and by 400)
- example leap year (divisible by 4 and not by 100)
- example not leap year (divisible by 4 and by 100)
- last fully supported  - 2105

Test execution time on K64F is now ~39 sec.
@0xc0170
Copy link
Contributor

0xc0170 commented Jan 8, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jan 8, 2018

Build : SUCCESS

Build number : 812
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5802/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@mbed-ci
Copy link

mbed-ci commented Jan 8, 2018

@mbed-ci
Copy link

mbed-ci commented Jan 8, 2018

Copy link
Contributor

@cmonr cmonr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job on lowering the execution time.

Is there a reason that self.notify_complete(False) isn't present after e725b4c#diff-f51e22d57406e551f8f327cbf2119b77R120 ?

Also, is there a reason that a single timestamp is compared at once, instead doing all comparisons with a single kv transaction?

@mprse
Copy link
Contributor Author

mprse commented Jan 9, 2018

@cmonr

Is there a reason that self.notify_complete(False) isn't present after e725b4c#diff-f51e22d57406e551f8f327cbf2119b77R120 ?

There is no reason. Do we need this?

Also, is there a reason that a single timestamp is compared at once, instead doing all comparisons with a single kv transaction?

Yes, there is a reason. This test verifies two functions _rtc_maketime and _rtc_localtime. First one converts calendar time to timestamp. The result is then send to the host and verified against timestamp created using python library for the same calendar date/time. If the result is correct, then "passed" key is send to the device with encoded value which holds expected week day and year day for the tested calendar date/time (this is needed to test _rtc_localtime). Second function converts timestamp back to calendar date/time, returned structure except date and time provides also week day and year day. So now the verified timestamp value is converted back to calendar date/time and check is made if result structure has date and time same which have been given to _rtc_maketime and valid week day and year day (provided from host).

@cmonr
Copy link
Contributor

cmonr commented Jan 11, 2018

Is there a reason that self.notify_complete(False) isn't present after e725b4c#diff-f51e22d57406e551f8f327cbf2119b77R120 ?

There is no reason. Do we need this?

I was thinking that we did, but it looks I was mistaken.

The reasoning for the test messaging makes sense. I had originally wanted to simply the back and forth traffic to make logging a bit cleaner, but it's not a high priority.

@adbridge
Copy link
Contributor

This is dependent on #5363 scheduled for 5.8. Thus this also needs to go to 5.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants