Feature request #8045

add unit test for startup options (pluginpath, configpath)

Added by Regis Haubourg over 11 years ago. Updated almost 11 years ago.

Status:Closed
Priority:Normal
Assignee:Larry Shaffer
Category:Build/Install
Pull Request or Patch supplied:Yes Resolution:
Easy fix?:No Copied to github as #:16887

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 c8e818ab
Added by Hugo Mercier over 11 years ago

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

Revision 9d4956ad
Added by Hugo Mercier over 11 years ago

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

Revision a8b9d439
Added by Hugo Mercier over 11 years ago

refs #8045 Fix python plugin path encoding issues

History

#1 Updated by Vincent Mora over 11 years ago

  • Assignee set to Vincent Mora

#2 Updated by Vincent Mora over 11 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 ?

#3 Updated by Hugo Mercier over 11 years ago

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

#4 Updated by Hugo Mercier over 11 years ago

  • Assignee changed from Regis Haubourg to Hugo Mercier
  • Status changed from Feedback to In Progress
  • 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

#5 Updated by Regis Haubourg over 11 years ago

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

#6 Updated by Vincent Mora over 11 years ago

Hi Regis,

The bug fixes are included in the PR #749.

#7 Updated by Hugo Mercier over 11 years ago

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

#8 Updated by Hugo Mercier over 11 years ago

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

It has been merged by Tim (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 ?

#9 Updated by Larry Shaffer over 11 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).

#10 Updated by Hugo Mercier over 11 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

#11 Updated by Jürgen Fischer almost 11 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF