make check modifies preferences

Bug #374455 reported by Krzysztof Kosinski
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Low
Unassigned

Bug Description

When make check is executed, it modifies the user's preferences file. After make check, my prefs file contained the following snippet, clearly originating from preferences-test.h:

  <group
     prefentry="100"
     id="test"
     intvalue="1000" />

It would be good if make check could not alter the user's preferences, e.g. any changes were discarded after the test run finishes. Another issue is that if preferences are saved during the test run, they could also be saved on crashes, which can lead to prefs file corruption (see bug #168922)

Tags: build
tags: added: build
Revision history for this message
Jon A. Cruz (jon-joncruz) wrote :

Problems in the architecture of the unit tests expanded in set of changes in the code and then exposed in a latter one.

The unit tests just need to use a mock object for preferences and have a define for a test mode for the older framework.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

The tests in question test the preferences object itself. Using a mock up object would defeat their purpose.

There should be a way to tell the object not to save the preferences during destruction.

jazzynico (jazzynico)
Changed in inkscape:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.