~canonical-platform-qa/ubuntu-system-tests/snap-channel-support

« back to all changes in this revision

Viewing changes to ubuntu_system_tests/helpers/file_system.py

  • Committer: Santiago Baldassin
  • Date: 2017-02-20 19:49:08 UTC
  • mfrom: (495.1.16 trunk)
  • Revision ID: santiago.baldassin@canonical.com-20170220194908-yn7p71t4rzxj3idy
MErgeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
#
4
4
# Ubuntu System Tests
5
 
# Copyright (C) 2015 Canonical
 
5
# Copyright (C) 2015-2017 Canonical
6
6
#
7
7
# This program is free software: you can redistribute it and/or modify
8
8
# it under the terms of the GNU General Public License as published by
44
44
DIR_CONFIG = '.config'
45
45
DIR_CACHE = '.cache'
46
46
DIR_LOCAL = '.local'
 
47
DIR_CALCULATOR = 'com.ubuntu.calculator'
47
48
DIR_CAMERA_PICTURES = 'com.ubuntu.camera'
48
49
DIR_DEKKO = 'dekko.dekkoproject'
49
50
DIR_MUSIC_CONFIG = 'com.ubuntu.music'
52
53
DIR_WEBBROWSER = 'webbrowser-app'
53
54
DIR_SHARE = 'share'
54
55
DIR_IMPORTED = 'imported'
 
56
DIR_SNAP = 'snap'
55
57
 
56
58
# Home dirs
57
59
DIR_HOME = os.path.expanduser('~')
63
65
DIR_HOME_CONFIG = os.path.join(DIR_HOME, DIR_CONFIG)
64
66
DIR_HOME_LOCAL = os.path.join(DIR_HOME, DIR_LOCAL)
65
67
DIR_HOME_CACHE = os.path.join(DIR_HOME, DIR_CACHE)
 
68
DIR_HOME_SNAP = os.path.join(DIR_HOME, DIR_SNAP)
66
69
 
67
70
# .share dir
68
71
DIR_HOME_LOCAL_SHARE = os.path.join(DIR_HOME_LOCAL, DIR_SHARE)
122
125
DIR_PREINSTALLED_CLICK_APPS = '/usr/share/click/preinstalled/'
123
126
 
124
127
 
 
128
def get_home_snap_path(*args):
 
129
    """Return path pre-fixed with ~/snap directory."""
 
130
    return os.path.join(DIR_HOME_SNAP, *args)
 
131
 
 
132
 
125
133
def delete_file(file_name):
126
134
    """Delete the file passed as parameter. In case the file does not
127
135
    exist, the deletion is skipped"""