Bug 884331 - rhts-mk-get-current-tag uses insufficient regular expression to get correct name of the test
Summary: rhts-mk-get-current-tag uses insufficient regular expression to get correct n...
Keywords:
Status: CLOSED DUPLICATE of bug 869311
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 0.10
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dan Callaghan
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-05 23:11 UTC by Matěj Cepl
Modified: 2018-02-06 00:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-06 04:09:11 UTC
Embargoed:


Attachments (Terms of Use)

Description Matěj Cepl 2012-12-05 23:11:13 UTC
Description of problem:
$ git tag -l
gedit-desktop-rhel7-gedit-fileOpenLocation-1_2-1
gedit-desktop-rhel7-gedit-fileOpenReopen-1_1-1
gedit-desktop-rhel7-gedit-fileOpenReopen-1_1-2
gedit-desktop-rhel7-gedit-fileOpenReopen-1_1-3
gedit-desktop-rhel7-gedit-fileOpenReopen-1_3-1
gedit-desktop-rhel7-gedit-fileSaveWhenNotAllowed-1_2-1
gedit-desktop-rhel7-gedit-helper-code-1_13-1
gedit-desktop-rhel7-gedit-helper-code-1_13-2
gedit-desktop-rhel7-gedit-helper-code-1_13-3
gedit-desktop-rhel7-gedit-helper-code-1_13-4
gedit-desktop-rhel7-gedit-helper-code-1_13-5
gedit-desktop-rhel7-gedit-helper-code-1_13-6
gedit-desktop-rhel7-gedit-helper-code-1_13-7
gedit-desktop-rhel7-gedit-loadPlugins-1_2-1
gedit-desktop-rhel7-gedit-searchText-1_2-2
gedit-desktop-rhel7-gedit-searchText-1_2-4
gedit-desktop-rhel7-gedit-searchText-1_3-1
gedit-desktop-rhel7-gedit-searchText-1_3-3
gedit-desktop-rhel7-gedit-searchTextNext-1_1-1
gedit-desktop-rhel7-gedit-searchTextNext-1_2-1
gedit-desktop-rhel7-gedit-searchTextNext-1_2-2
gedit-desktop-rhel7-gedit-searchTextNext-1_2-3
gedit-desktop-rhel7-gedit-searchTextNext-1_2-4
gedit-desktop-rhel7-gedit-searchTextReplace-1_2-1
gedit-desktop-rhel7-gedit-searchTextReplace-1_2-2
gedit-desktop-rhel7-gedit-searchTextReplace-1_2-3
gedit-desktop-rhel7-gedit-startViaCommand-1_1-1
gedit-desktop-rhel7-gedit-startViaCommand-1_1-2
gedit-desktop-rhel7-gedit-startViaCommand-1_1-3
gedit-desktop-rhel7-gedit-startViaCommand-1_1-4
gedit-desktop-rhel7-gedit-startViaCommand-1_1-5
gedit-desktop-rhel7-gedit-startViaCommandGnomeTextEditor-1_1-1
gedit-desktop-rhel7-gedit-startViaMenu-1_2-1
$ sh -x /usr/libexec/rhts/rhts-mk-get-current-tag
+ '[' 0 -gt 1 ']'
+ '[' 0 == 1 ']'
++ rhts-mk-get-test-package-name
+ PACKAGE_NAME=gedit
++ echo
++ sed -e 's/\./_/g'
+ CURRENT_VERSION=
+ CURRENT_TAG=gedit--1
+ '[' -d CVS ']'
+ '[' -d .svn ']'
+ git log -1
++ cut -c 11-
++ git for-each-ref --count=1 --sort=-taggerdate '--format=%(refname)' 'refs/tags/gedit*'
+ CURRENT_TAG=gedit-desktop-rhel7-gedit-startViaMenu-1_2-1
++ git cat-file -t refs/tags/gedit-desktop-rhel7-gedit-startViaMenu-1_2-1
+ '[' -n gedit-desktop-rhel7-gedit-startViaMenu-1_2-1 -a tag '!=' tag ']'
+ '[' 0 == 1 ']'
+ echo gedit-desktop-rhel7-gedit-startViaMenu-1_2-1
gedit-desktop-rhel7-gedit-startViaMenu-1_2-1
$ grep 'export TEST' Makefile 
export TEST=/desktop/rhel7/gedit/startViaCommand
export TESTVERSION=1.1
$ 

By using too short glob

'refs/tags/gedit*' script collects wrong name of the tag (“gedit-desktop-rhel7-gedit-startViaMenu-1_2-1” instead of “gedit-desktop-rhel7-gedit-startViaCommand-1_1-5”)

which then leads to bad results.

Version-Release number of selected component (if applicable):
rhts-devel-4.52-3.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1.see above
2.
3.
  
Actual results:
wrong tag found

Expected results:
appropriate tag should be found

Additional info:

Comment 1 Dan Callaghan 2012-12-06 04:09:11 UTC
(In reply to comment #0)
> $ sh -x /usr/libexec/rhts/rhts-mk-get-current-tag

Running these scripts directly like this is not helpful, they rely on TEST and TESTVERSION being exported from the Makefile so the output you are showing here is broken for other reasons.

I think the actual problem here is these two tags:

> gedit-desktop-rhel7-gedit-startViaCommand-1_1-5
> gedit-desktop-rhel7-gedit-startViaCommandGnomeTextEditor-1_1-1

which is to say, I think this is a dupe of bug 869311.

Please upgrade to rhts-devel-4.53 and re-open this bug if you are still seeing issues.

*** This bug has been marked as a duplicate of bug 869311 ***


Note You need to log in before you can comment on or make changes to this bug.