Skip to content
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

add information about testing in workspace and components #58

Merged
merged 1 commit into from
Mar 19, 2020
Merged

Conversation

doudou
Copy link
Member

@doudou doudou commented Mar 12, 2020

No description provided.

@doudou doudou requested a review from henriquejsfj March 12, 2020 20:25
@doudou
Copy link
Member Author

doudou commented Mar 12, 2020

@henriquejsfj could you have a read ? I'm very aware that it's probably hard to understand how to understand all of this ... I'd be very glad for a thorough review.

Copy link
Collaborator

@henriquejsfj henriquejsfj left a comment

Choose a reason for hiding this comment

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

Very good! I never used workspace tests with cmake tests and all but the explanation seems to be enough.

@doudou
Copy link
Member Author

doudou commented Mar 17, 2020

Nice. You probably will have more comments once you've actually written the tests of the websocket controldev task, let's wait until then before merging this.

@g-arjones
Copy link
Collaborator

Pretty comprehensive... I missed one common case though: testing that ONE output port sends TWO samples in a row. I remember I needed this once and I couldn't manage, ended up creating a socket in my tests and connecting the iodriver's base subject to it by setting task.properties.io_port

I mean something like:

expect_execution { task.set_and_check_something }
    .to do
        [have_one_new_sample(task.io_raw_out_port),
         have_one_new_sample(task.io_raw_out_port)]
    end

@doudou
Copy link
Member Author

doudou commented Mar 18, 2020

In hindsight, a rather obvious need, actually.

Would need to refactor the have_one_new_sample add a more generic have_new_samples expectation with a count and then use it to "reimplement" have_one_new_sample.

Added an issue on syskit rock-core/tools-syskit#232

@g-arjones
Copy link
Collaborator

Thanks... 👍

@doudou doudou merged commit ff2b2ca into master Mar 19, 2020
@doudou doudou deleted the testing branch March 19, 2020 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants