On Wed, Mar 25, 2020 at 01:15:03PM +0100, Christian Ehrhardt wrote:
> >> Christian, would you mind looking into this one?
> > Sure, taking a look ...

Thanks :-)

> >> On Tue, Mar 24, 2020 at 07:14:02PM -0700, Bryce Harrington wrote:

> This is the test that fails on LP, other than the warning it succeds:
> 
> 1) League\CommonMark\Tests\Functional\BinTest::testNoArgsOrStdin
> Using assertContains() with string haystacks is deprecated and will not be
> supported in PHPUnit 9. Refactor your test to use
> assertStringContainsString() or assertStringContainsStringIgnorin
> gCase() instead.

I've been noticing a lot of packages throwing similar deprecation
warnings.  I fear whenever phpunit gets updated to version 9, many, many
things in the php stack will break...

> For now what do you think of this:
> --- tests/functional/BinTest.php.orig   2020-03-25 12:05:51.794955208 +0000
> +++ tests/functional/BinTest.php        2020-03-25 12:13:26.184955208 +0000
> @@ -103,6 +103,10 @@
>         $cmd = new Command(sprintf('cat %s | %s ',
> $this->getPathToData('atx_heading.md'), $this->getPathToCommonmark()));
>         $cmd->execute();
> 
> +        if (php_uname('m') == "s390x") {
> +            $this->markTestSkipped(sprintf('Test skipped: STDIN test flaky
> and non reprodicible on s390x\n - out: "%s" - err: "%s"',
> $cmd->getOutput(), $cmd->getError()));
> +        }
> +
>         $this->assertEquals(0, $cmd->getExitCode());
>         $expectedContents =
> trim(file_get_contents($this->getPathToData('atx_heading.html')));
>         $this->assertEquals($expectedContents, $cmd->getOutput());
> 
> That will keep the remaining tests but skip this odd one on s390x only.
> And as a bonus we might get in the skip message what is failing in the LP
> environment?
>
> Example:
> 1) League\CommonMark\Tests\Functional\BinTest::testStdin
> Test skipped: STDIN test flaky and non reprodicible on s390x\n - out:

Works for me, thanks.  I'll package it up and upload it.

Bryce

-- 
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam

Reply via email to