Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 523078 Details for
Bug 640838
media-gfx/curaengine-2.3.1: emake failed: fatal error: cppunit/extensions/TestFactoryRegistry.h: No such file or directory
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
curaengine-2.3.1-remove-gcodeplannertest.patch
file_640838.txt (text/plain), 10.07 KB, created by
Michael 'veremitz' Everitt
on 2018-03-09 06:05:14 UTC
(
hide
)
Description:
curaengine-2.3.1-remove-gcodeplannertest.patch
Filename:
MIME Type:
Creator:
Michael 'veremitz' Everitt
Created:
2018-03-09 06:05:14 UTC
Size:
10.07 KB
patch
obsolete
>diff --git a/CMakeLists.txt b/CMakeLists.txt >index 47dcd2d1..c2316d68 100644 >--- a/CMakeLists.txt >+++ b/CMakeLists.txt >@@ -110,9 +125,6 @@ set(engine_SRCS # Except main.cpp. > ) > > # List of tests. For each test there must be a file tests/${NAME}.cpp and a file tests/${NAME}.h. >-set(engine_TEST >- GCodePlannerTest >-) > set(engine_TEST_INFILL > ) > set(engine_TEST_UTILS >diff --git a/tests/GCodePlannerTest.cpp b/tests/GCodePlannerTest.cpp >deleted file mode 100644 >index 4c0493ed..00000000 >--- a/tests/GCodePlannerTest.cpp >+++ /dev/null >@@ -1,99 +0,0 @@ >-//Copyright (c) 2015 Ultimaker B.V. >-//CuraEngine is released under the terms of the AGPLv3 or higher. >- >-#include "GCodePlannerTest.h" >- >-#include "../src/MeshGroup.h" //Needed to construct the GCodePlanner. >- >-#define ALLOWED_ESTIMATE_ERROR 0.1 //Fraction of the time estimates that the estimate is allowed to be off from the ground truth. >- >-namespace cura >-{ >- >-CPPUNIT_TEST_SUITE_REGISTRATION(GCodePlannerTest); >- >-void GCodePlannerTest::setUp() >-{ >- SettingsBase settings; >- settings.setSetting("machine_extruder_count", "1"); >- MeshGroup meshgroup(&settings); >- meshgroup.createExtruderTrain(0); >- >- storage = new SliceDataStorage(&meshgroup); //Empty data. >- storage->retraction_config_per_extruder[0].speed = 25; // set some semi realistic data >- storage->retraction_config_per_extruder[0].primeSpeed = 25; >- storage->retraction_config_per_extruder[0].distance = 10; >- >- // make a new GCodePathConfig and put it at a dummy place (note that the config is not an actual travel config!) >- storage->travel_config_per_extruder.emplace_back(PrintFeatureType::MoveCombing); >- storage->travel_config_per_extruder.back().init(60, MM2INT(0.4), 3000, 20, 1.0); >- >- FanSpeedLayerTimeSettings fan_speed_layer_time_settings; //A dummy fan speed and layer time settings. >- fan_speed_layer_time_settings.cool_min_layer_time = 0; >- fan_speed_layer_time_settings.cool_min_layer_time_fan_speed_max = 1; >- fan_speed_layer_time_settings.cool_fan_speed_min = 0; >- fan_speed_layer_time_settings.cool_fan_speed_max = 1; >- fan_speed_layer_time_settings.cool_min_speed = 0.5; >- std::vector<FanSpeedLayerTimeSettings> fan_speed_layer_time_settings_per_extruder; >- fan_speed_layer_time_settings_per_extruder.push_back(fan_speed_layer_time_settings); >- // Slice layer z layer last current is inside fan speed and layer combing comb travel travel avoid >- // storage nr height position extruder mesh time settings mode offset avoid distance >- gCodePlanner = new GCodePlanner(*storage, 0, 0, 0.1, Point(0,0), 0, false, fan_speed_layer_time_settings_per_extruder, CombingMode::OFF, 100, false, 50 ); >-} >- >-void GCodePlannerTest::tearDown() >-{ >- delete gCodePlanner; >- gCodePlanner = nullptr; >- delete storage; >- storage = nullptr; >-} >- >-void GCodePlannerTest::computeNaiveTimeEstimatesRetractionTest() >-{ >- >- TimeMaterialEstimates estimate_empty = gCodePlanner->computeNaiveTimeEstimates(); //First try estimating time and material without any content. >- TimeMaterialEstimates estimate_empty_expected(0,0,0,0); //We expect the estimate of all time and material used to be 0. >- verifyEstimates(estimate_empty,estimate_empty_expected,"Empty GCodePlanner"); >- >- GCodeExport gcode; >- GCodePathConfig configuration = storage->travel_config_per_extruder.back(); >- RetractionConfig retraction_config = storage->retraction_config_per_extruder.back(); >- gCodePlanner->addExtrusionMove(Point(0, 0), &configuration, SpaceFillType::Lines, 1.0f); //Need to have at least one path to have a configuration. >- GCodePath* travel_path = gCodePlanner->getLatestPathWithConfig(&configuration, SpaceFillType::None); >- gCodePlanner->addTravel_simple(Point(10, 0), travel_path); >- TimeMaterialEstimates before_retract = gCodePlanner->computeNaiveTimeEstimates(); >- travel_path->retract = true; >- TimeMaterialEstimates after_retract = gCodePlanner->computeNaiveTimeEstimates(); >- TimeMaterialEstimates estimate_one_retraction = after_retract - before_retract; >- double retract_unretract_time = retraction_config.distance / retraction_config.primeSpeed; >- TimeMaterialEstimates estimate_one_retraction_expected(0,retract_unretract_time * 0.5,retract_unretract_time * 0.5,0); >- verifyEstimates(estimate_one_retraction,estimate_one_retraction_expected,"One retraction"); >-} >- >-void GCodePlannerTest::verifyEstimates(const TimeMaterialEstimates& observed,const TimeMaterialEstimates& expected,std::string test_description) >-{ >- //Check each of the four estimates in the TimeMaterialEstimate instances. >- { >- std::stringstream ss; >- ss << test_description << ": Extrude time is " << observed.getExtrudeTime() << " instead of the expected " << expected.getExtrudeTime(); >- CPPUNIT_ASSERT_MESSAGE(ss.str(),observed.getExtrudeTime() - expected.getExtrudeTime() < expected.getExtrudeTime() * ALLOWED_ESTIMATE_ERROR + 0.001); >- } >- { >- std::stringstream ss; >- ss << test_description << ": Unretracted travel time is " << (observed.getTotalUnretractedTime() - observed.getExtrudeTime()) << " instead of the expected " << (expected.getTotalUnretractedTime() - expected.getExtrudeTime()); >- CPPUNIT_ASSERT_MESSAGE(ss.str(),observed.getTotalUnretractedTime() - observed.getExtrudeTime() - (expected.getTotalUnretractedTime() - expected.getExtrudeTime()) < (expected.getTotalUnretractedTime() - expected.getExtrudeTime()) * ALLOWED_ESTIMATE_ERROR + 0.001); >- } >- { >- std::stringstream ss; >- ss << test_description << ": Retracted travel time is " << (observed.getTotalTime() - observed.getTotalUnretractedTime()) << " instead of the expected " << (expected.getTotalTime() - expected.getTotalUnretractedTime()); >- CPPUNIT_ASSERT_MESSAGE(ss.str(),observed.getTotalTime() - observed.getTotalUnretractedTime() - (expected.getTotalTime() - expected.getTotalUnretractedTime()) < (expected.getTotalTime() - expected.getTotalUnretractedTime()) * ALLOWED_ESTIMATE_ERROR + 0.001); >- } >- { >- std::stringstream ss; >- ss << test_description << ": Material used is " << observed.getMaterial() << " instead of the expected " << expected.getMaterial(); >- CPPUNIT_ASSERT_MESSAGE(ss.str(),observed.getMaterial() - expected.getMaterial() < expected.getMaterial() * ALLOWED_ESTIMATE_ERROR + 0.001); >- } >-} >- >-} >\ No newline at end of file >diff --git a/tests/GCodePlannerTest.h b/tests/GCodePlannerTest.h >deleted file mode 100644 >index 90890c48..00000000 >--- a/tests/GCodePlannerTest.h >+++ /dev/null >@@ -1,76 +0,0 @@ >-//Copyright (c) 2015 Ultimaker B.V. >-//CuraEngine is released under the terms of the AGPLv3 or higher. >- >-#ifndef GCODEPLANNERTEST_H >-#define GCODEPLANNERTEST_H >- >-#include <cppunit/TestFixture.h> >-#include <cppunit/extensions/HelperMacros.h> >- >-#include "../src/gcodePlanner.h" >-#include "../src/sliceDataStorage.h" >- >-namespace cura >-{ >- >-class GCodePlannerTest : public CppUnit::TestFixture >-{ >- CPPUNIT_TEST_SUITE(GCodePlannerTest); >- CPPUNIT_TEST(computeNaiveTimeEstimatesRetractionTest); >- CPPUNIT_TEST_SUITE_END(); >- >-public: >- /*! >- * \brief Sets up the test suite to prepare for testing. >- * >- * This creates an instance of <em>gcodePlanner</em>, ready for filling with >- * data. >- */ >- void setUp(); >- >- /*! >- * \brief Tears down the test suite when testing is done. >- * >- * This destroys the <em>gcodePlanner</em> instance. >- */ >- void tearDown(); >- >- //The actual test cases. >- void computeNaiveTimeEstimatesRetractionTest(); >- >-private: >- /*! >- * \brief The instance of gcodePlanner that can be used for testing. >- * >- * This instance is re-created for each test. Between tests it will be >- * <em>nullptr</em>. >- */ >- GCodePlanner* gCodePlanner; >- >- /*! >- * \brief Slice data storage to construct the <em>GCodePlanner</em> with. >- * >- * It also holds configurations for the paths to add to the >- * <em>GCodePlanner</em>. >- */ >- SliceDataStorage* storage; >- >- /*! >- * \brief Asserts that the two time material estimates are equal. >- * >- * If they are not equal, the error messages are formulated according to the >- * specified observed results versus the specified expected results. It will >- * include a specified string describing what test it was. >- * >- * \param observed The observed time material estimates. >- * \param expected The expected (true) time material estimates. >- * \param test_description A description of the test that was performed to >- * get the observed results. >- */ >- void verifyEstimates(const TimeMaterialEstimates& observed,const TimeMaterialEstimates& expected,std::string test_description); >-}; >- >-} >- >-#endif // GCODEPLANNERTEST_H >- >diff --git a/tests/runtest.py b/tests/runtest.py >index 2ddf55b6..f46676cb 100644 >--- a/tests/runtest.py >+++ b/tests/runtest.py >@@ -235,11 +235,14 @@ class Setting: > tree = ast.parse(code, "eval") > compiled = compile(code, self._key, "eval") > except (SyntaxError, TypeError) as e: >- print("Parse error in function (" + code + ") for setting", self._key + ":", str(e)) >+ print("Parse error in function (" + str(code) + ") for setting", self._key + ":", str(e)) >+ return None > except IllegalMethodError as e: > print("Use of illegal method", str(e), "in function (" + code + ") for setting", self._key) >+ return None > except Exception as e: > print("Exception in function (" + code + ") for setting", self._key + ":", str(e)) >+ return None > > return eval(compiled, globals(), locals) > > namespace cura > { > CPPUNIT_TEST_SUITE_REGISTRATION(StringTest);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 640838
:
509622
|
523076
| 523078