[SOLVED] FreeCAD tests fail

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

[SOLVED] FreeCAD tests fail

Post by PrzemoF »

Any help would be greatly appreciated. The system is ubuntu:20.04 LTS, running headless, so I cont provide the usual info, but it builds and test the cutting edge source code with no switches. Used dependencies are defined here: https://gitlab.com/PrzemoF/FreeCAD/-/bl ... Dockerfile

Full log: https://gitlab.com/PrzemoF/FreeCAD/-/jobs/1448350608

Code: Select all

test50 (PathTests.TestPathCore.TestPathCore)
Test Path.Length calculation ... ok
test00 (PathTests.TestPathDeburr.TestPathDeburr)
Verify chamfer depth and offset for an end mill. ... Traceback (most recent call last):
  File "<string>", line 40, in <module>
  File "/builds/PrzemoF/FreeCAD/build/Mod/Test/TestApp.py", line 70, in TestText
    retval = r.run(s)
  File "/usr/lib/python3.8/unittest/runner.py", line 176, in run
    test(result)
  File "/usr/lib/python3.8/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.8/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.8/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.8/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.8/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.8/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.8/unittest/case.py", line 736, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.8/unittest/case.py", line 649, in run
    result.startTest(self)
  File "/usr/lib/python3.8/unittest/runner.py", line 54, in startTest
    self.stream.write(self.getDescription(test))
<class 'UnicodeEncodeError'>: 'ascii' codec can't encode character '\xb0' in position 89: ordinal not in range(128)
Recompute......
Cleaning up file based variables 00:01
ERROR: Job failed: exit code 1
Different system, same problem: https://forum.freecadweb.org/viewtopic.php?f=4&t=55074
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD tests fail - help needed

Post by sgrogan »

I'm not sure of modern syntax https://wiki.freecadweb.org/Testing
Can you just run the Path tests? In the Gui it's called TestPathApp
If this passes try TestFemApp, I get an error in the gui on current master/Win
"fight the good fight"
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: FreeCAD tests fail - help needed

Post by PrzemoF »

OK, I'll try. Thanks! I'm compiling FreeCAD in Boxes/ubuntu:20.04 , so I'll have a setup closer to what's in the docker image.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD tests fail - help needed

Post by sgrogan »

PrzemoF wrote: Fri Jul 23, 2021 5:41 pm OK, I'll try. Thanks!
I think of instead of

Code: Select all

freecadcmd -t 0

Code: Select all

freecadcmd -t TestPathApp

Code: Select all

freecadcmd -t TestFemApp
"fight the good fight"
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: FreeCAD tests fail - help needed

Post by PrzemoF »

On local ubuntu system:
TestPathApp passes,
TestFemApp fails but with a different error
-t 0 fails with the same error as TestFemApp

So there is a problem with gitlab builds, but there seem to be another problem as well. I can provide the results, but I feel the tests are currently dead.
Please test and let me know if you can successfully run tests.

I'll be bisecting the problem later on.
bernd wrote: XXX


Could you take a look TestFemApp when you have some free time?
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: FreeCAD tests fail - help needed

Post by PrzemoF »

https://gitlab.com/PrzemoF/FreeCAD/-/jobs/1448600274

TestPathApp triggers the same error on the gitlab docker build:

Code: Select all

Verify chamfer depth and offset for an end mill. ... Traceback (most recent call last):
  File "<string>", line 40, in <module>
  File "/builds/PrzemoF/FreeCAD/build/Mod/Test/TestApp.py", line 70, in TestText
    retval = r.run(s)
  File "/usr/lib/python3.8/unittest/runner.py", line 176, in run
    test(result)
  File "/usr/lib/python3.8/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.8/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.8/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.8/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.8/unittest/case.py", line 736, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python3.8/unittest/case.py", line 649, in run
    result.startTest(self)
  File "/usr/lib/python3.8/unittest/runner.py", line 54, in startTest
    self.stream.write(self.getDescription(test))
<class 'UnicodeEncodeError'>: 'ascii' codec can't encode character '\xb0' in position 89: ordinal not in range(128)
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FreeCAD tests fail - help needed

Post by bernd »

TestFemApp runs fine for me on my local machine! which commit fails for you? which test fails? I have one test desctivated allready becase it fails on other systems even if passes on my system.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD tests fail - help needed

Post by sgrogan »

bernd wrote: Fri Jul 23, 2021 8:08 pm which test fails?
test_constraint_entrif
Win and Ubuntu 18.04
"fight the good fight"
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD tests fail - help needed

Post by sgrogan »

sgrogan wrote: Fri Jul 23, 2021 8:22 pm test_constraint_entrif
(femtest.app.test_solver_calculix.TestSolverCalculix)
"fight the good fight"
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: FreeCAD tests fail - help needed

Post by PrzemoF »

I rebase often. The current next will be on:

commit 56441e4b02344966f524e4afd405ec2020a67c30
Author: Russell Johnson <47639332+Russ4262@users.noreply.github.com>
Date: Thu Jul 22 23:16:53 2021 -0500

For some reason my local build in boxes fails with a different error. I'll try to build in docker container based on przemof/executor image. That should produce the same error, but I'll be able to debug the code.
Post Reply