tests: Split test_ust_constructor into several tests
authorKienan Stewart <kstewart@efficios.com>
Thu, 7 Mar 2024 20:20:17 +0000 (15:20 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 8 Mar 2024 16:34:33 +0000 (11:34 -0500)
commitf506900f904887310c26a441ea86352fc27242c2
treed544bbb3556fb1882c7dd73db8add62b12853d2e
parentf6fd58e865ae9918ca5c9b935c526140b1622f3c
tests: Split test_ust_constructor into several tests

Observed issue
==============

TAP parsers fail when parsing a single executable that contains
several plans. Eg.,

```
ok 44 - Found no unexpected events
PASS: ust/ust-constructor/test_ust_constructor.py 44 - Found no unexpected events

1..44
ERROR: ust/ust-constructor/test_ust_constructor.py - multiple test plans
ok 1 - Create a session
ERROR: ust/ust-constructor/test_ust_constructor.py 1 - Create a session # UNPLANNED
```

and

```
14:03:23 org.tap4j.parser.ParserException: Error parsing TAP Stream: Duplicated TAP Plan found.
14:03:23  at org.tap4j.parser.Tap13Parser.parseTapStream(Tap13Parser.java:257)
14:03:23  at org.tap4j.parser.Tap13Parser.parseFile(Tap13Parser.java:231)
14:03:23  at org.tap4j.plugin.TapParser.parse(TapParser.java:172)
14:03:23  at org.tap4j.plugin.TapPublisher.loadResults(TapPublisher.java:475)
14:03:23  at org.tap4j.plugin.TapPublisher.performImpl(TapPublisher.java:352)
14:03:23  at org.tap4j.plugin.TapPublisher.perform(TapPublisher.java:312)
14:03:23  at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
14:03:23  at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80)
14:03:23  at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
14:03:23  at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818)
14:03:23  at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:767)
14:03:23  at hudson.model.Build$BuildExecution.post2(Build.java:179)
14:03:23  at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:711)
14:03:23  at hudson.model.Run.execute(Run.java:1918)
14:03:23  at hudson.matrix.MatrixRun.run(MatrixRun.java:153)
14:03:23  at hudson.model.ResourceController.execute(ResourceController.java:101)
14:03:23  at hudson.model.Executor.run(Executor.java:442)
14:03:23 Caused by: org.tap4j.parser.ParserException: Duplicated TAP Plan found.
14:03:23  at org.tap4j.parser.Tap13Parser.parseLine(Tap13Parser.java:354)
14:03:23  at org.tap4j.parser.Tap13Parser.parseTapStream(Tap13Parser.java:252)
14:03:23  ... 16 more
```

Cause
=====

09a872ef0b4e1432329aa42fecc61f50e9baa367 introduced multiple plans in
to test_ust_constructor

Solution
========

Split the script into several smaller test scripts sharing a common
import for data and the bulk of execution.

Known drawbacks
===============

None.

Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I81649d714afe0e325996b730d5c72cfd5b28d1f8
tests/regression/Makefile.am
tests/regression/ust/ust-constructor/Makefile.am
tests/regression/ust/ust-constructor/__init__.py [new file with mode: 0644]
tests/regression/ust/ust-constructor/test_ust_constructor.py [deleted file]
tests/regression/ust/ust-constructor/test_ust_constructor_c_dynamic.py [new file with mode: 0755]
tests/regression/ust/ust-constructor/test_ust_constructor_c_static.py [new file with mode: 0755]
tests/regression/ust/ust-constructor/test_ust_constructor_cpp_dynamic.py [new file with mode: 0755]
tests/regression/ust/ust-constructor/test_ust_constructor_cpp_static.py [new file with mode: 0755]
tests/regression/ust/ust-constructor/ust_constructor_common.py [new file with mode: 0644]
This page took 0.025737 seconds and 4 git commands to generate.