Feature request #8045

add unit test for startup options (pluginpath, configpath)

Added by Regis Haubourg almost 4 years ago. Updated about 3 years ago.

Status:Closed Start Date:06/12/2013
Priority:Normal Due date:
Assigned to:Larry Shaffer % Done:

100%

Category:Build / Install
Target version:Future Release - High Priority
Platform: Resolution:
Platform version: Pull Request or Patch supplied:Yes
Status info: Tag:

Description

it would be nice to have test to ensure following options work OK:

- alternative plugin paths set in environnement variable.
- configpath options to move profile AND/OR settings to another location.

Those tests should ensure that everything goes well with Windows file names (spaces, slash vs backslash, special encoded character in username)

Associated revisions

Revision c8e818abbb1ca27e8284d3b46cf2ef735e6b9453
Added by Hugo Mercier almost 4 years ago

refs #8045 Add unit tests for path passed from command line

Revision 9d4956ad4e7c5dcd1140cbc10172764ab1b3025c
Added by Hugo Mercier almost 4 years ago

refs #8045 Fix the way main() parse path names with special characters

Revision a8b9d439e45d66229f5cecb49255019a50ffca45
Added by Hugo Mercier almost 4 years ago

refs #8045 Fix python plugin path encoding issues

History

Updated by Vincent Mora almost 4 years ago

  • Assigned to set to Vincent Mora

Updated by Vincent Mora almost 4 years ago

What I understand from the demand is:
  • for alternative plugin paths
    • checking, if the environment variable QGIS_PLUGINPATH exists, that the directory $QGIS_PLUGINPATH exists and is readable
  • for config path
    • running qgis --configpath $TEST_DIR
    • checking that $TEST_DIR/qgis.db has been created
  • for settings
    • running --optionspath $TEST_DIR
    • checking that $TEST_DIR/QGIS/QGIS2.ini has been created

Regis, can you please tell me if this is what you had in mind ?

Updated by Hugo Mercier almost 4 years ago

  • Status changed from Open to Feedback
  • Assigned to changed from Vincent Mora to Regis Haubourg

Updated by Hugo Mercier almost 4 years ago

  • Status changed from Feedback to In Progress
  • Assigned to changed from Regis Haubourg to Hugo Mercier
  • Pull Request or Patch supplied changed from No to Yes

Pull request submitted :
https://github.com/qgis/Quantum-GIS/pull/749

A new unit test is added that tests QGIS_PLUGINPATH, --configpath and --optionspath

Two character encoding issues have been found :
  • in main.cpp
  • in the way python plugin paths are parsed

Updated by Regis Haubourg over 3 years ago

Hi Hugo,
Did you file bugs and fixe the character encoding issues mentionned or should we do it?

Updated by Vincent Mora over 3 years ago

Hi Regis,

The bug fixes are included in the PR #749.

Updated by Hugo Mercier over 3 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Updated by Hugo Mercier over 3 years ago

  • Status changed from Resolved to Feedback
  • Assigned to changed from Hugo Mercier to Larry Shaffer

It has been merged by Tim (https://github.com/qgis/Quantum-GIS/commit/64c947b2f05da81d8a3a119132c8ba95669076f6

The only missing part is whether this new test (PyQgsAppStartup) works correctly on MacOSX.
Larry, do you think you could have a look and tell me if it fails ?

Updated by Larry Shaffer over 3 years ago

  • Target version changed from Version 2.0.0 to Future Release - High Priority

Hi Hugo,

I have made some changes to the test. See pull request (as patch). Please review.

These are the issues I had on Mac (see commit message as well):

  • Test directories needed to be created first
  • Subdirectory for .ini file is "qgis.org" on Mac

I have not tested on Win or Linux (will next week).

Updated by Hugo Mercier over 3 years ago

  • Status changed from Feedback to Resolved

Thanks Larry for the fix and the improvements ! It works fine on Linux here.
Still Windows to test

Updated by J├╝rgen Fischer about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom