So I was wondering how we can run unit tests in FreeCAD and from FreeCAD --help I found that the command is FreeCAD -t 0 for all the tests. And so I tried it:
Code: Select all
[sudhanshu@archlinux build_nonetgen]$ ./bin/FreeCAD -t 0
FreeCAD 0.19, Libs: 0.19R20910 +41 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2020
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
##### #### ### ####
# # # # # #
# ## #### #### # # # # #
#### # # # # # # # ##### # #
# # #### #### # # # # #
# # # # # # # # # ## ## ##
# # #### #### ### # # #### ## ## ##
connect failed: No such file or directory
import TestFemImport
import TestObjectExistance
import TestFemCommon
import TestObjectCreate
import TestObjectType
import TestMaterialUnits
import TestMeshCommon
import TestMeshEleTetra10
import TestResult
import TestCcxTools
import TestSolverFrameWork
test_import_draft (drafttests.test_import.DraftImport)
Import the Draft module. ...
------------------------------------------------------------------------------
Try importing 'Draft'
ok
test_import_draft_geomutils (drafttests.test_import.DraftImport)
Import Draft geometrical utilities. ...
------------------------------------------------------------------------------
Try importing 'DraftGeomUtils'
ok
test_import_draft_svg (drafttests.test_import.DraftImport)
Import Draft SVG utilities. ...
------------------------------------------------------------------------------
Try importing 'getSVG'
ok
test_import_draft_vecutils (drafttests.test_import.DraftImport)
Import Draft vector utilities. ...
------------------------------------------------------------------------------
Try importing 'DraftVecUtils'
ok
test_arc (drafttests.test_creation.DraftCreation)
Create a circular arc. ...
------------------------------------------------------------------------------
Temporary document 'DraftCreation'
Test 'Draft Arc'
radius=2
startangle=0, endangle=90
ok
test_arc_3points (drafttests.test_creation.DraftCreation)
Create a circular arc from three points. ...
------------------------------------------------------------------------------
Temporary document 'DraftCreation'
Test 'Draft Arc 3Points'
a=Vector (5.0, 0.0, 0.0), b=Vector (4.0, 3.0, 0.0)
c=Vector (0.0, 5.0, 0.0)
----------------
Arc by 3 points
p1: Vector (5.0, 0.0, 0.0)
p2: Vector (4.0, 3.0, 0.0)
p3: Vector (0.0, 5.0, 0.0)
Radius: 5.000000000000002
Center: Vector (-1.3322676295501878e-15, -1.3322676295501878e-15, 0.0)
ok
test_bezcurve (drafttests.test_creation.DraftCreation)
Create a bezier curve of six points, degree five. ...
------------------------------------------------------------------------------
Temporary document 'DraftCreation'
Test 'Draft BezCurve'
a=Vector (0.0, 0.0, 0.0), b=Vector (2.0, 2.0, 0.0)
c=Vector (5.0, 3.0, 0.0), d=Vector (9.0, 0.0, 0.0)
e=Vector (12.0, 5.0, 0.0), f=Vector (12.0, 8.0, 0.0)
ok
test_bspline (drafttests.test_creation.DraftCreation)
Create a BSpline of three points. ...
------------------------------------------------------------------------------
Temporary document 'DraftCreation'
Test 'Draft BSpline'
a=Vector (0.0, 0.0, 0.0), b=Vector (2.0, 0.0, 0.0)
c=Vector (2.0, 2.0, 0.0)
ok
test_circle (drafttests.test_creation.DraftCreation)
Create a circle. ...
------------------------------------------------------------------------------
Temporary document 'DraftCreation'
Test 'Draft Circle'
radius=3
ok
test_cubicbezcurve (drafttests.test_creation.DraftCreation)
Create a cubic bezier curve of four points. ...
------------------------------------------------------------------------------
Temporary document 'DraftCreation'
Test 'Draft CubBezCurve'
a=Vector (0.0, 0.0, 0.0), b=Vector (2.0, 2.0, 0.0)
c=Vector (5.0, 3.0, 0.0), d=Vector (9.0, 0.0, 0.0)
ok
test_dimension_angular (drafttests.test_creation.DraftCreation)
Create an angular dimension between two lines at given angles. ...
------------------------------------------------------------------------------
Temporary document 'DraftCreation'
Test 'Draft Dimension Angular'
Occasionally crashes
center=Vector (0.0, 0.0, 0.0)
angle1=59.99999999999999, angle2=10.0
point=Vector (3.0, 1.0, 0.0)
Traceback (most recent call last):
File "/run/media/sudhanshu/Thunder/Repos/FreeCAD_sd/build_nonetgen/Mod/Draft/draftviewproviders/view_dimension.py", line 730, in attach
self.onChanged(vobj,"FontSize")
File "/run/media/sudhanshu/Thunder/Repos/FreeCAD_sd/build_nonetgen/Mod/Draft/draftviewproviders/view_dimension.py", line 875, in onChanged
self.font.size = vobj.FontSize.Value * self.ScaleMultiplier
<class 'AttributeError'>: 'ViewProviderAngularDimension' object has no attribute 'ScaleMultiplier'
Traceback (most recent call last):
File "/run/media/sudhanshu/Thunder/Repos/FreeCAD_sd/build_nonetgen/Mod/Draft/draftviewproviders/view_dimension.py", line 875, in onChanged
self.font.size = vobj.FontSize.Value * self.ScaleMultiplier
<class 'AttributeError'>: 'ViewProviderAngularDimension' object has no attribute 'ScaleMultiplier'
ok
test_dimension_linear (drafttests.test_creation.DraftCreation)
Create a linear dimension. ...
------------------------------------------------------------------------------
Temporary document 'DraftCreation'
Test 'Draft Dimension'
Occasionally crashes
a=Vector (0.0, 0.0, 0.0), b=Vector (9.0, 0.0, 0.0)
c=Vector (4.0, -1.0, 0.0)
ok
test_dimension_radial (drafttests.test_creation.DraftCreation)
Create a circle and then a radial dimension. ...
------------------------------------------------------------------------------
Temporary document 'DraftCreation'
Test 'Draft Dimension Radial'
radius=3
startangle=0, endangle=90
ICE default IO error handler doing an exit(), pid = 126439, errno = 32
Program received signal SIGSEGV, Segmentation fault.
#0 /usr/lib/libc.so.6(+0x3c370) [0x7fa37f93b370]
#1 0x7fa3801b32b6 in QAbstractEventDispatcherPrivate::allocateTimerId() from /usr/lib/libQt5Core.so.5+0x36
#2 0x7fa3801b38aa in QAbstractEventDispatcher::registerTimer(int, Qt::TimerType, QObject*) from /usr/lib/libQt5Core.so.5+0x1a
#3 0x7fa3801e65ef in QObject::startTimer(int, Qt::TimerType) from /usr/lib/libQt5Core.so.5+0x6f
#4 0x7fa3801efd9e in QTimer::start() from /usr/lib/libQt5Core.so.5+0x3e
#5 0x7fa38125c43b in QNetworkConfigurationManagerPrivate::startPolling() from /usr/lib/libQt5Network.so.5+0xdb
#6 0x7fa38125ca1e in QNetworkConfigurationManagerPrivate::updateConfigurations() from /usr/lib/libQt5Network.so.5+0x54e
#7 /usr/lib/libQt5Network.so.5(+0x15c857) [0x7fa3812f4857]
#8 0x7fa3801e3ada in QObject::event(QEvent*) from /usr/lib/libQt5Core.so.5+0x2ba
#9 0x7fa3801b6516 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/libQt5Core.so.5+0x1a6
#10 0x7fa3801b8d56 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) from /usr/lib/libQt5Core.so.5+0x156
#11 /usr/lib/libQt5Core.so.5(+0x2fe244) [0x7fa38020f244]
#12 /usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x27e) [0x7fa37ce296be]
#13 /usr/lib/libglib-2.0.so.0(+0x6d531) [0x7fa37ce2b531]
#14 /usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x31) [0x7fa37ce2b571]
#15 0x7fa38020e890 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/libQt5Core.so.5+0x60
#16 0x7fa3801b505c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/libQt5Core.so.5+0x12c
#17 0x7fa37ffd9c62 in QThread::exec() from /usr/lib/libQt5Core.so.5+0x62
#18 /usr/lib/libQt5Core.so.5(+0xc9dd6) [0x7fa37ffdadd6]
#19 /usr/lib/libpthread.so.0(+0x9422) [0x7fa381483422]
#20 /usr/lib/libc.so.6(clone+0x43) [0x7fa37f9feb83]
Maybe I should try FEM specific tests first.