17 Commits

Author SHA1 Message Date
Masayuki Igawa
3bc7395cbc
Remove duplication of skip_tracker
This commit removes of the duplication of skip_tracker in
tempest/lib/cmd and tools. And we already have 'skip-tracker' command.
It comes from tempest/lib/cmd/skip_tracker.py, so I think we don't need
to have duplicated code. So we should deprecate it in tools directory.

This commit also add a default test_path value for convenience and
compatibility.

Change-Id: I43a0a9d115e59c860714a47aea11017e8b58b5e7
2017-04-21 12:12:42 +09:00
zhuzeyu
f5501338e6 Using oslo_log instead of logging
Change-Id: I97fc44df44a686110b1e0c47c56adf7207cb5647
2017-01-23 18:29:00 +08:00
Joe H. Rahme
a72f2c6fb7 Removes explicit looping over dict .keys() method
Looping over the .keys() method of a dictionary is an anti-pattern. In
fact, the method is actually creating a new list which is redundant and
unnecessary. Looping over a dictionary implicitly loops over its keys.

Change-Id: I937d3f060bf95bb86e50fcb5dec8def524f6208e
2016-07-11 16:45:22 +02:00
zhang.lei
a4b1cef845 Optimize "open" method with context manager
Use opening context manager to open a file.
Change-Id: Ice9be6350fd01cbf5eec686ac68d7fc8b5a4d5bd
2016-03-10 11:21:58 +08:00
Ken'ichi Ohmichi
7616d19360 Fix H404/405 violations for tools
There is a lot of H404/405 violations in Tempest now, and that leads
difficult to migrate the code to tempest-lib or the other projects'
repos. This patch fixes these violations for tools for enabling
H404/405 rules on Tempest.

Change-Id: I4e1d78532d8f96edd5fd28a7bd2d62181fe9144b
2015-11-18 07:04:12 +00:00
Masayuki Igawa
e8d31a0b80 Remove vim headers
We don't need to have the vim headers in each source files. We can set
it in our vimrc file instead. Also if set incorrectly, gate (pep8 check)
will catch the mistakes.

More discussions:
http://lists.openstack.org/pipermail/openstack-dev/2013-October/017353.html

Change-Id: I43703e2289212389c7841f44691ae7849ed1f505
Closes-Bug: #1229324
2014-01-20 11:22:45 +09:00
Matthew Treinish
bae2a99b3a Add filenames to skip_tracker.py output
This commit adds support for also printing the filenames along with
the bug number in the skip tracker output. This should make it
slightly easier to find the skips and remove them.

Change-Id: Ia3502f1a48bb9e028d046fa60307e398582e6124
2013-10-20 23:56:21 -04:00
Giulio Fidente
83181a9703 introduces skip_because decorator
this change introduces a skip_because decorator which accepts two args
a bug and a condition; also updates the skip tracker accordingly

Change-Id: If53f2ef81d6bddbce284267216254b467046855f
2013-10-04 15:48:28 +02:00
ZhiQiang Fan
39f9722500 Replace OpenStack LLC with OpenStack Foundation
Some files still use trademark OpenStack LLC in header, which
should be changed to OpenStack Foundation.

NOTE: tools/install_venv.py is not synced from oslo-incubator, so
it is modified too.

Change-Id: I0084684ff5225076291fea857eb010d638291bd0
Fixes-Bug: #1214176
2013-09-21 11:03:53 +08:00
Matthew Treinish
bd6fcb68d7 Fix skip tracker regex for multi-line skips
This commit changes the regex used for detecting a skip line by
removing the requirement on an '(' immediately following 'skip'.
This changes the skip tracker to match multiline skips (assuming
'skip' is on the same line as the bug number. It also enables
conditional skips that have a bug number from being picked up.

Change-Id: I95a0521661084034f7625c3c517ae9210120de4c
2013-08-19 10:14:54 -04:00
Dirk Mueller
1db5db2dc5 Use Python 3.x compatible syntax constructs
Avoid print operator, deprected except and
other things covered by statical checks.

Change-Id: I89f9608b977b2d4567300ec82558284dac347c9a
2013-06-23 20:51:36 +02:00
Giampaolo Lauria
07f51e62bf Update skip_tracker test directory
After the last file restructuring, the tests dir was removed.
Now, all tests are in tempest/

Change-Id: Icffc6d39dadf066f577e0b6b5526abb43e674d86
2013-05-23 16:12:32 -04:00
Matthew Treinish
1f82a177b5 Make skip_tracker bug keyword detection more robust.
This commit changes the regex for detecting a bug in
skip_tracker.py to be case insensitive and support a colon
instead of whitespace immediately following the bug keyword.
Previously only Bug or bug was detected, and whitespace needed
to follow the bug keyword for skip_tracker.py to pick up the bug
number correctly. This causes issues with some skips because they
didn't comply with these constraints. This commit fixes these issues
by allow any capitalization of 'bug' and allowing either a colon or
whitespace to immediately follow the bug keyword.

Change-Id: I0e9a073b195d475e0b1eebc76e4db160742e171e
2013-03-14 18:20:36 -04:00
Matthew Treinish
d2a4c08aa5 Add duplicate bug detection to skip_tracker.py
Previously, if a tempest test was skipped because of a bug that
was marked a duplicate of another bug the skip tracker would not
check the status of the duplicate bug. This would cause fixed bugs
from being shown up in the list, because the original bug's status
is not necessarily updated if it is marked as a duplicate.

This commit fixes this behavior by checking if there is a duplicate
bug first. Then after all the bugs' statuses are checked the list of
duplicate bugs is checked. If a duplicate bug is marked as fixed the
original bug is added to list of bugs that is safe to unskip.

Change-Id: Ia1aaec9e01a97556d17b0640a95e03f0f0b37680
2013-03-11 15:13:42 -04:00
Sean Dague
a3d2ab7716 make skip_tracker directly executable
make it so the skip tracker can be executed directly on the
command line.

Change-Id: I607984bfe5f6229d8f8ae21ea7ff4ec8c4fad48b
2013-01-12 08:43:49 -05:00
Jay Pipes
a6aa5f2107 Fix checks in server listing only lok for an ID
The list server filter details checks were checking
entire mappings against the list of mappings returned
from a call to GET /servers/detail. Unfortunately, the
mappings returned by the GET /servers/detail and the
mapping returned by POST /servers are slightly different,
resulting in the comparison failing. We really only are
checking that the server instance we expect to be in the
returned list of instances is there, so checking for the
server ID in the returned list is fine.

Change-Id: If9680f56a1ea06ffe93393d06b23bd231ccddd01
Fixes: LP Bug 1028465pep8 build for tempest.
2012-07-24 19:40:29 -04:00
Jay Pipes
257d3f847b Adds a script for tracking bug skips in tempest
New file tools/skip_tracker.py can be used to show the
status and priority of bugs that are marking test methods
for skipping, and instruct the caller to remove skips
on bugs that have been fixed in upstream. Output looks like this:

jpipes@uberbox:~/repos/tempest$ python tools/skip_tracker.py
INFO: Total bug skips found: 52
INFO: Total unique bugs causing skips: 30
INFO: Bug # 940500 (      Medium - Fix Released)
INFO: Bug # 963248 (   Undecided -      Invalid)
INFO: Bug # 966249 (   Undecided - Fix Released)
INFO: Bug # 987121 (      Medium - Fix Released)
INFO: Bug # 988920 (   Undecided -      Opinion)
INFO: Bug # 997725 (      Medium - Fix Released)
INFO: Bug # 999084 (      Medium -      Triaged)
INFO: Bug # 999209 (         Low - Fix Released)
INFO: Bug # 999219 (        High -      Triaged)
INFO: Bug # 999567 (      Medium - Fix Released)
INFO: Bug # 999594 (      Medium -  In Progress)
INFO: Bug # 999608 (         Low - Fix Released)
INFO: Bug #1002892 (   Undecided -      Invalid)
INFO: Bug #1002901 (   Undecided -      Invalid)
INFO: Bug #1002911 (   Undecided -      Invalid)
INFO: Bug #1002918 (   Undecided -      Invalid)
INFO: Bug #1002924 (   Undecided -   Incomplete)
INFO: Bug #1002926 (   Undecided -      Invalid)
INFO: Bug #1002935 (   Undecided -      Invalid)
INFO: Bug #1004007 (         Low -    Confirmed)
INFO: Bug #1004564 (         Low -    Confirmed)
INFO: Bug #1005397 (   Undecided -      Invalid)
INFO: Bug #1005423 (         Low -      Triaged)
INFO: Bug #1006033 (   Undecided -          New)
INFO: Bug #1006725 (         Low -      Triaged)
INFO: Bug #1006857 (         Low -    Confirmed)
INFO: Bug #1006875 (         Low -    Confirmed)
INFO: Bug #1014647 (      Medium -    Confirmed)
INFO: Bug #1014683 (   Undecided -          New)
INFO: Bug #1022411 (   Undecided -  In Progress)
The following bugs have been fixed and the corresponding skips
should be removed from the test cases:

   940500
   966249
   987121
   997725
   999209
   999567
   999608

Change-Id: Ic58fc8beb2f6134504d4eb2f6ebe40fa24fe06f6
2012-07-08 23:01:31 -04:00