Luxoft / Twister

Twister Test Automation Framework
http://www.twistertesting.com/
Apache License 2.0
38 stars 21 forks source link

Client install overwrites existing config directory #95

Closed CJHoffmann closed 10 years ago

CJHoffmann commented 10 years ago

Installing the 130920 client from my local copy or from an administrators directory, the ~/twister/config directory gets overwritten. This is seen by checking the fwmconfig.xml before and after and noting that the paths have been reset to defaults.

The CLI response indicates that a backup of the config directory was made to and from ~/.twister but that directory does not exist (it was deleted during previous tests). See LOG 1 below

If I create ~/.twister (mode 775 or 777) the client install fails. See LOG 2 below.

LOG 1

[choffman@pearl327 installer]$ python2.7 installer.py

Please select what you wish to install: [1] the Twister dependencies (must be ROOT) [2] the Twister clients [3] the Twister servers [q] e[x]it, don't install anything Your choice: 2 Will install clients.

Hello choffman !

WARNING! Another version of Twister is installed at /home/choffman/twister/! If you continue, all files from that folder will be PERMANENTLY DELETED, Only the config folder will be saved! Are you sure you want to continue? (yes/no): yes

Back-up config folder (from /home/choffman/twister/config to /home/choffman/.twister)...

Created folder structure /home/choffman/twister/bin. Copied file /home/choffman/TwisterSrc/twister_20_September/bin/cli.py to /home/choffman/twister/bin. Copied file /home/choffman/TwisterSrc/twister_20_September/bin/start_client to /home/choffman/twister/bin. Copied file /home/choffman/TwisterSrc/twister_20_September/bin/start_client.py to /home/choffman/twister/bin. Copied file /home/choffman/TwisterSrc/twister_20_September/bin/start_packet_sniffer.py to /home/choffman/twister/bin. Created folder structure /home/choffman/twister/doc. Copied dir /home/choffman/TwisterSrc/twister_20_September/doc/ to /home/choffman/twister/doc. Created folder structure /home/choffman/twister/demo. Copied dir /home/choffman/TwisterSrc/twister_20_September/demo/ to /home/choffman/twister/demo. Created folder structure /home/choffman/twister/config. Copied dir /home/choffman/TwisterSrc/twister_20_September/config/ to /home/choffman/twister/config. Created folder structure /home/choffman/twister/client. Copied dir /home/choffman/TwisterSrc/twister_20_September/client/ to /home/choffman/twister/client. Created folder structure /home/choffman/twister/services/PacketSniffer. Copied dir /home/choffman/TwisterSrc/twister_20_September/services/PacketSniffer/ to /home/choffman/twister/services/PacketSniffer. Copied file /home/choffman/TwisterSrc/twister_20_September/services/__init__.py to /home/choffman/twister/services. Created folder structure /home/choffman/twister/common. Copied file /home/choffman/TwisterSrc/twister_20_September/common/__init__.py to /home/choffman/twister/common. Copied file /home/choffman/TwisterSrc/twister_20_September/common/constants.py to /home/choffman/twister/common. Copied file /home/choffman/TwisterSrc/twister_20_September/common/suitesmanager.py to /home/choffman/twister/common. Copied file /home/choffman/TwisterSrc/twister_20_September/common/configobj.py to /home/choffman/twister/common. Created folder structure /home/choffman/twister/common/jython. Copied dir /home/choffman/TwisterSrc/twister_20_September/common/jython/ to /home/choffman/twister/common/jython.

Moving config folder back (from /home/choffman/.twister to /home/choffman/twister/config)...

Twister installation done!

[choffman@pearl327 installer]$

LOG 2

[choffman@pearl327 installer]$ python2.7 installer.py

Please select what you wish to install: [1] the Twister dependencies (must be ROOT) [2] the Twister clients [3] the Twister servers [q] e[x]it, don't install anything Your choice: 2 Will install clients.

Hello choffman !

WARNING! Another version of Twister is installed at /home/choffman/twister/! If you continue, all files from that folder will be PERMANENTLY DELETED, Only the config folder will be saved! Are you sure you want to continue? (yes/no): yes Error! Cannot create .twister dir /home/choffman/.twister! The installation cannot continue!

CJHoffmann commented 10 years ago

It looks like the config directory is being copied into the ~/twister/config directory rather that the ~/.twister/config directory.

CJHoffmann commented 10 years ago

Tested with 131004 package. The config directory looks like it survives an in-place upgrade whether the installation occurs from a user's directory or an administrator's.