Travis CI: Test fails [solved]

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
Crizzo
Translations & International Support Teams Manager
Translations & International Support Teams Manager
Posts: 1291
Joined: Thu Apr 23, 2009 1:20 pm
Location: Stuttgart, Germany
Name: Christian
Contact:

Travis CI: Test fails [solved]

Post by Crizzo »

Hi,

I've this github pr in my repo: https://github.com/Crizz0/ipanonym/pull/11

Most tests are just fine: https://travis-ci.org/github/Crizz0/ipa ... /721476610

But this first job: https://travis-ci.org/github/Crizz0/ipa ... /721476611 always fails.

The thing is, I don't know why it throws these "not found" errors:

Code: Select all

$ sh -c "if [ '$IMAGE_ICC' != '0' ]; then travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS; fi"

travis/check-image-icc-profiles.sh: line 20: parallel: command not found

The command "sh -c "if [ '$IMAGE_ICC' != '0' ]; then travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS; fi"" exited with 127.

0.00s$ sh -c "if [ '$EPV' != '0' -a '$NOTESTS' = '1' ]; then phpBB/vendor/bin/EPV.php run --dir='phpBB/ext/$EXTNAME/'; fi"

sh: 1: phpBB/vendor/bin/EPV.php: not found

The command "sh -c "if [ '$EPV' != '0' -a '$NOTESTS' = '1' ]; then phpBB/vendor/bin/EPV.php run --dir='phpBB/ext/$EXTNAME/'; fi"" exited with 127.
Has someone an idea?
My extensions for phpBB: crizzo.de
German phpBB Support at www.phpbb.de
User avatar
AbaddonOrmuz
Recognised Extension Developer
Posts: 1003
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact:

Re: Travis CI: Test fails

Post by AbaddonOrmuz »

You have a syntax error in the file .travis.yml on line 50.

https://github.com/Crizz0/ipanonym/blob ... ml#L49-L50

You are using 3 spaces instead of two, and it's being used as a parameter of the previous command instead of being a new YML list item, because setup-phpbb.sh expects 3 parameters and you are only passing two.

Code: Select all

$ travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION - ../Crizz0/ipanonym/travis/prepare-epv.sh $EPV $NOTESTS
+DB=none
+TRAVIS_PHP_VERSION=7.1
+NOTESTS=-
+'[' - == 1 ']'
+'[' none == mariadb ']'
+'[' - '!=' 1 ']'
Notice how the $NOTESTS variable received a value of the character - instead of 1, which makes the condition to fail.

Because of that, the EPV is not being installed, so it throws the following error:

Code: Select all

$ sh -c "if [ '$EPV' != '0' -a '$NOTESTS' = '1' ]; then phpBB/vendor/bin/EPV.php run --dir='phpBB/ext/$EXTNAME/'; fi"
sh: 1: phpBB/vendor/bin/EPV.php: not found
You also have this error:

Code: Select all

$ sh -c "if [ '$IMAGE_ICC' != '0' ]; then travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS; fi"
travis/check-image-icc-profiles.sh: line 20: parallel: command not found
But that's handled by phpBB.
Some of my phpBB extensions:
Image Imgur | :chart_with_upwards_trend: SEO Metadata | Image Markdown | :lock: Auto-lock Topics
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user :penguin:
User avatar
Crizzo
Translations & International Support Teams Manager
Translations & International Support Teams Manager
Posts: 1291
Joined: Thu Apr 23, 2009 1:20 pm
Location: Stuttgart, Germany
Name: Christian
Contact:

Re: Travis CI: Test fails

Post by Crizzo »

Thank you. A space was to much :shock:

I removed it and the EPV runs, the other one is still broken:

Code: Select all

$ sh -c "if [ '$IMAGE_ICC' != '0' ]; then travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS; fi"

travis/check-image-icc-profiles.sh: line 20: parallel: command not found

The command "sh -c "if [ '$IMAGE_ICC' != '0' ]; then travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS; fi"" exited with 127.
AbaddonOrmuz wrote:
Wed Aug 26, 2020 11:21 pm
But that's handled by phpBB.
So you mean, this need's to be fixed in the phpBB repository?

Or I simply deactivate the icc profile sniffer, because there are no image in my extension.

Edit: Strange is, that it did run from the phpbb/phpbb repo just fine yesterday: https://travis-ci.org/github/phpbb/phpbb/jobs/721108229 :?

Edit2: NOTESTS to setup-phpbb resolved this problem: https://github.com/Crizz0/ipanonym/pull ... a643c0e92c Thx to rxu :!:
My extensions for phpBB: crizzo.de
German phpBB Support at www.phpbb.de
User avatar
RMcGirr83
Former Team Member
Posts: 21613
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Travis CI: Test fails [solved]

Post by RMcGirr83 »

This is the one that I use for all my exts

https://travis-ci.org/github/rmcgirr83/ ... 948/config
Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Post Reply

Return to “Extension Writers Discussion”