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

tests: init RobotFramework and add basic xtimer test #10843

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/xtimer_cli/README.md
Expand Up @@ -7,6 +7,8 @@ Consult the 'help' shell command for available actions.

The automated tests are based on RobotFramework and thus depend on additional
Python packages, namely `robotframework` and `riot_pal`.
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add a reference to dist/robotframework/README.md for installing the requirements here?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep makes sense

See also the RobotFramework [README.md](../../dist/robotframework/README.md)
for more details.

## Background

Expand Down
2 changes: 1 addition & 1 deletion tests/xtimer_cli/main.c
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 HAW Hamburg
* Copyright (C) 2019 HAW Hamburg
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
Expand Down
4 changes: 4 additions & 0 deletions tests/xtimer_cli/tests/01__xtimer_base.robot
@@ -1,15 +1,19 @@
*** Settings ***
Documentation Basic tests to verify functionality of the Xtimer API.

# reset application and check DUT has correct firmware, skip all tests on error
Suite Setup Run Keywords Reset Application
... DUT Must Have API Firmware
# reset application and check DUT is up again befor every test case
Test Setup Run Keywords Reset Application
... DUT Must Have API Firmware
Copy link
Contributor

Choose a reason for hiding this comment

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

As this is somehow a POC/showcase for using robot framework a little more comments here would be nice to make clear what Suite Setup, Test Setup and so on actually does.
Also IIRC the second DUT Must Have API Firmware is a little hack to ensure the communication channel is working correctly. -> this should be noted explicitly to make it clear to others that this is required.

Copy link
Member Author

Choose a reason for hiding this comment

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

first: why should I repeat the RF documentation? There is plenty documentation on Suite/Test Setup at the original sources, I can add some links in the dist/robotframework/README.md but copy-pasting docu doesn't make sense (to me).

second: no that's no hack in that sense, it's just there to ensure that before each test the devices are reset and responding correctly before running the tests. The Suite Setup could be avoided but on the other it helps to skip all tests if there is a problem with the board.


# import libs and keywords
Library Xtimer port=%{PORT} baudrate=%{BAUD} timeout=${10}
Resource api_shell.keywords.txt
Resource riot_base.keywords.txt

# add default tags to all tests
Force Tags xtimer

*** Test Cases ***
Expand Down