Skip to content

tap2junit fails on test input when tests time out #1847

Description

@sam-github
2:03:21 mkdir out/junit || true
12:03:21 tap2junit -i test.tap -o out/junit/test.xml
12:03:21 tap2junit -i cctest.tap -o out/junit/cctest.xml || true
12:03:21 rm -Rf out/Release/obj.target
12:03:21 [aix61-ppc64] $ /bin/sh -xe /tmp/jenkins5548162882024815593.sh
12:03:22 + mkdir out/junit
12:03:22 mkdir: 0653-358 Cannot create out/junit.
12:03:22 out/junit: Do not specify an existing file.
12:03:22 + true
12:03:22 + tap2junit -i test.tap -o out/junit/test.xml
12:03:27 Traceback (most recent call last):
12:03:27   File "/usr/bin/tap2junit", line 11, in <module>
12:03:27     sys.exit(main())
12:03:27   File "/opt/freeware/lib/python2.7/site-packages/tap2junit/__main__.py", line 44, in main
12:03:27     result = parse(os.path.splitext(args.input.name)[0], data)
12:03:27   File "/opt/freeware/lib/python2.7/site-packages/tap2junit/__main__.py", line 15, in parse
12:03:27     t = TestCase(test.description, None, test.yaml['duration_ms'])
12:03:27 TypeError: 'NoneType' object has no attribute '__getitem__'

I sshed in and reproduced it on AIX, then copied the file to my laptop, ubuntu, and reproduced here. tap file is https://gist.github.com/c15ba6bd9ff7b529a7aa04fa176f068a

core/build (centos7-python-3.7 $% u=) % scp  test-osuosl-aix61-ppc64_be-1:/home/iojs/issue.tap .                                                                             
issue.tap                                           100%  185KB   1.3MB/s   00:00
core/build (centos7-python-3.7 $% u=) % pip install tap2junit
Collecting tap2junit
  Downloading https://files.pythonhosted.org/packages/af/22/f8436b6d750114dd5047970ad878259edeafa89fac72b8dced476965c6d6/tap2junit-0.1.4.tar.gz                              
Collecting junit-xml (from tap2junit)
  Downloading https://files.pythonhosted.org/packages/a6/2a/f8d5aab80bb31fcc789d0f2b34b49f08bd6121cd8798d2e37f416df2b9f8/junit-xml-1.8.tar.gz                                
Collecting yamlish (from tap2junit)
  Downloading https://files.pythonhosted.org/packages/29/fd/d607e225d757aa2950abff9ba19145be3c72b74266fc48f3266ec7ba3087/yamlish-0.18.1-py2-none-any.whl                     
Requirement already satisfied: six in /home/sam/.local/lib/python2.7/site-packages (from junit-xml->tap2junit) (1.12.0)                                                      
Requirement already satisfied: PyYAML>=3.09 in /usr/lib/python2.7/dist-packages (from yamlish->tap2junit) (3.13)                                                             
Building wheels for collected packages: tap2junit, junit-xml
  Running setup.py bdist_wheel for tap2junit ... done
  Stored in directory: /home/sam/.cache/pip/wheels/12/a9/54/a5f8ed9d0adfc510303204543f743bac3fc3a1b236d4545b10                                                               
  Running setup.py bdist_wheel for junit-xml ... done
  Stored in directory: /home/sam/.cache/pip/wheels/c6/c5/65/5b166afb6eac87dc300368ec4d92f39502dd41cdc73056d49e                                                               
Successfully built tap2junit junit-xml
Installing collected packages: junit-xml, yamlish, tap2junit
  The script tap2junit is installed in '/home/sam/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                          
Successfully installed junit-xml-1.8 tap2junit-0.1.4 yamlish-0.18.1
core/build (centos7-python-3.7 $% u=) % /home/sam/.local/bin/tap2junit -i issue.tap -o test.xml                                                                              
Traceback (most recent call last):
  File "/home/sam/.local/bin/tap2junit", line 10, in <module>
    sys.exit(main())
  File "/home/sam/.local/lib/python2.7/site-packages/tap2junit/__main__.py", line 44, in main                                                                                
    result = parse(os.path.splitext(args.input.name)[0], data)
  File "/home/sam/.local/lib/python2.7/site-packages/tap2junit/__main__.py", line 15, in parse                                                                               
    t = TestCase(test.description, None, test.yaml['duration_ms'])
TypeError: 'NoneType' object has no attribute '__getitem__'

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions