FreeCAD/FreeCAD-test.spec
Stefan Brüns c43d052fbd Accepting request 982665 from home:StefanBruens:branches:science
- Update to version 0.20
- Update to version 0.20:
  * Lots of bugfixes and new features, for details see
    https://wiki.freecad.org/Release_notes_0.20 and
    https://github.com/FreeCAD/FreeCAD/releases/tag/0.20
- Drop upstream patches:
  * fix_unittestgui_tkinter_py3.patch
  * fix-smesh-vtk9.patch
  * 0001-Test-remove-not-needed-u-before-py3-unicode-string.patch
  * 0001-Test-fix-exception-handling-in-tests-for-units.patch
  * 0001-Test-Provide-more-useful-information-when-unit-trans.patch
  * 0002-Base-Fix-wrong-character-encoding-for-micro-siemens.patch
  * 0001-improve-search-for-VTK-9.patch
- Add 0001-Gui-Quarter-Add-missing-OpenGL-includes.patch
- Add 0001-Avoid-catching-SIGSEGV-defer-to-system-services.patch
- Remove VTK::Java/java-devel dependency, add
  0001-improve-search-for-VTK-9.patch

OBS-URL: https://build.opensuse.org/request/show/982665
OBS-URL: https://build.opensuse.org/package/show/science/FreeCAD?expand=0&rev=149
2022-06-15 16:03:40 +00:00

65 lines
1.9 KiB
RPMSpec

#
# spec file for package FreeCAD-test
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: FreeCAD-test
Version: 0.20
Release: 0
Summary: Meta source package that runs the FreeCAD testsuite when built
License: GPL-2.0-or-later AND LGPL-2.0-or-later
Group: Productivity/Graphics/CAD
URL: https://www.freecadweb.org/
BuildRequires: FreeCAD = %{version}
%if 0%{?suse_version} > 1500
BuildRequires: gmsh
%endif
# Test suite fails on 32bit and I don't want to debug that anymore
ExcludeArch: %ix86 %arm ppc s390 s390x
%description
This is just executing the test suite at build time.
%build
export LC_ALL="C.utf-8"
export PYTHONPATH=%{_libdir}/FreeCAD/lib
python3 -c "\
import FreeCAD
import unittest
print(FreeCAD.__unit_test__, file=sys.stderr)
results = {}
for name in FreeCAD.__unit_test__:
suite = unittest.TestSuite()
suite.addTest(unittest.defaultTestLoader.loadTestsFromName(name))
print(\"Running: {}\".format(name), file=sys.stderr)
r = unittest.TextTestRunner()
res = r.run(suite)
results[name] = res
totalerrors = 0
totalfailures = 0
for [name,res] in results.items():
print(name, file=sys.stderr)
print(res, file=sys.stderr)
totalerrors += len(res.errors)
totalfailures += len(res.failures)
exit((totalerrors + totalfailures) > 0)
"
%changelog