Appveyor is timing out

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
User avatar
bernd
Posts: 10975
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Appveyor is timing out

Postby bernd » Sat May 18, 2019 12:18 pm

abdullah
Posts: 3582
Joined: Sun May 04, 2014 3:16 pm

Re: Appveyor is timing out

Postby abdullah » Sat May 18, 2019 12:27 pm

bernd wrote:
Sat May 18, 2019 12:18 pm
git commit 06fffbd
Ok. I will them substitute mine with yours when I rebase ;) :
https://github.com/FreeCAD/FreeCAD/pull ... f16cb2e57b
abdullah
Posts: 3582
Joined: Sun May 04, 2014 3:16 pm

Re: Appveyor is timing out

Postby abdullah » Sat May 18, 2019 4:36 pm

This is the first failing file:
https://github.com/FreeCAD/FreeCAD/blob ... athPost.py

I do not see anything that may be disturbing Travis.

This is the log without it:
https://travis-ci.org/FreeCAD/FreeCAD/jobs/534190818

This is the log with it:
https://travis-ci.org/FreeCAD/FreeCAD/jobs/534151312

When it is included, the output of previous Path tests is not even there, it shows the error:

Code: Select all

TestPathApp (unittest.loader._FailedTest) ... ERROR

Any idea is very much welcome.
abdullah
Posts: 3582
Joined: Sun May 04, 2014 3:16 pm

Re: Appveyor is timing out

Postby abdullah » Sun May 19, 2019 10:37 am

I made a mistake yesterday during the search for the tests that failed. I enabled one test that is commented out in master.

I am doing a kind of binary search of this tests:

Code: Select all

from PathTests.TestPathLog   import TestPathLog
from PathTests.TestPathCore  import TestPathCore
#from PathTests.TestPathPost  import PathPostTestCases
from PathTests.TestPathGeom  import TestPathGeom
from PathTests.TestPathOpTools  import TestPathOpTools
from PathTests.TestPathUtil  import TestPathUtil
from PathTests.TestPathDepthParams        import depthTestCases

from PathTests.TestPathDressupHoldingTags import TestHoldingTags
from PathTests.TestPathDressupDogbone import TestDressupDogbone
#from PathTests.TestPathStock import TestPathStock
#from PathTests.TestPathTool import TestPathTool

#from PathTests.TestPathTooltable import TestPathTooltable
#from PathTests.TestPathToolController import TestPathToolController
#from PathTests.TestPathSetupSheet import TestPathSetupSheet
#from PathTests.TestPathDeburr  import TestPathDeburr

The first "paragraph" passes. The second paragraph (including all four tests) fails. I am running the build with the first two tests of this second paragraph enabled here:

https://travis-ci.org/FreeCAD/FreeCAD/jobs/534406889
abdullah
Posts: 3582
Joined: Sun May 04, 2014 3:16 pm

Re: Appveyor is timing out

Postby abdullah » Sun May 19, 2019 6:19 pm

This test is failing in Travis Windows:
https://github.com/FreeCAD/FreeCAD/blob ... ingTags.py

Any idea why it could be?
abdullah
Posts: 3582
Joined: Sun May 04, 2014 3:16 pm

Re: Appveyor is timing out

Postby abdullah » Tue May 21, 2019 6:40 pm

I think I am becoming insane.

This:
https://github.com/FreeCAD/FreeCAD/blob ... PathApp.py

does not fail.

This:
https://github.com/FreeCAD/FreeCAD/blob ... PathApp.py

fails.

To me it is the same content.

I do not know Python enough, but these tests do not provide much information when they fail. That is not very convenient...
User avatar
sgrogan
Posts: 6166
Joined: Wed Oct 22, 2014 5:02 pm

Re: Appveyor is timing out

Postby sgrogan » Tue May 21, 2019 9:50 pm

abdullah wrote:
Tue May 21, 2019 6:40 pm
I do not know Python enough, but these tests do not provide much information when they fail. That is not very convenient...
I don't see the difference, but python is sensitive to tabs/spaces.
You might want to weigh in on these threads
https://forum.freecadweb.org/viewtopic.php?f=18&t=35428
https://forum.freecadweb.org/viewtopic.php?f=10&t=36515
"fight the good fight"
abdullah
Posts: 3582
Joined: Sun May 04, 2014 3:16 pm

Re: Appveyor is timing out

Postby abdullah » Wed May 22, 2019 12:05 pm

sgrogan wrote:
Tue May 21, 2019 9:50 pm
abdullah wrote:
Tue May 21, 2019 6:40 pm
I do not know Python enough, but these tests do not provide much information when they fail. That is not very convenient...
I don't see the difference, but python is sensitive to tabs/spaces.
You might want to weigh in on these threads
https://forum.freecadweb.org/viewtopic.php?f=18&t=35428
https://forum.freecadweb.org/viewtopic.php?f=10&t=36515
Thanks for weighing in.

I am going to continue doing tests, but I go blind...
abdullah
Posts: 3582
Joined: Sun May 04, 2014 3:16 pm

Re: Appveyor is timing out

Postby abdullah » Wed May 22, 2019 12:32 pm

wmayer wrote:...ping...
I think I might have found the culprit of the Path tests failing. Indirectly loading the Gui.

The test that now fails:
https://github.com/FreeCAD/FreeCAD/blob ... ingTags.py

imports:
PathScripts.PathDressupHoldingTags

https://github.com/FreeCAD/FreeCAD/blob ... ingTags.py

which imports:
import PathScripts.PathDressup

https://github.com/FreeCAD/FreeCAD/blob ... Dressup.py

which imports and uses the GUI:

Code: Select all


import FreeCAD
import FreeCADGui
import PathScripts.PathJob as PathJob

def selection():
    '''isActive() ... return True if a dressup command is possible.'''
    if FreeCAD.ActiveDocument:
        sel = FreeCADGui.Selection.getSelectionEx()
        if len(sel) == 1 and sel[0].Object.isDerivedFrom("Path::Feature") and PathJob.Instances():
            return sel[0].Object
    return None

def hasEntryMethod(path):
    '''hasEntryDressup(path) ... returns true if the given object already has an entry method attached.'''
    if 'RampEntry' in path.Name or 'LeadInOut' in path.Name:
        return True
    if 'Dressup' in path.Name and hasattr(path, 'Base'):
        return hasEntryMethod(path.Base)
return False
I am not sure if the tests/code is suitable for a console mode testing.

I am not sure if we should only execute the tests in Gui mode (which makes them quite worthless for CI testing), or if we should think in rewritten them... what do you think?
wmayer
Site Admin
Posts: 16649
Joined: Thu Feb 19, 2009 10:32 am

Re: Appveyor is timing out

Postby wmayer » Wed May 22, 2019 12:43 pm

I think the test should be adjusted to be callable from command line mode.