diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2017-07-18 19:37:54 +0200 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2017-07-18 19:37:54 +0200 |
| commit | b61253b73ff30162146d9520ccb9ae52f0a4bde8 (patch) | |
| tree | 832294e506d28966d2dcec91e71a8b46e7d9ad19 /tools | |
| parent | de32a50421f75816e1685e3d7a4cd317ba881898 (diff) | |
unity.cmake: avoid setting not existing profiles when gfx tests fail
(bzr r4245.2.17)
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/unity.cmake | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/unity.cmake b/tools/unity.cmake index 95db47a7a..8bc7e270d 100755 --- a/tools/unity.cmake +++ b/tools/unity.cmake @@ -30,6 +30,9 @@ import time import xdg.BaseDirectory DEFAULT_COMMAND = "compiz --replace" +COMPIZ_CONFIG_PROFILE = "ubuntu" +UNITY_DEFAULT_PROFILE = "unity" +UNITY_LOWGFX_PROFILE = UNITY_DEFAULT_PROFILE + "-lowgfx" home_dir = os.path.expanduser("~%s" % os.getenv("SUDO_USER")) supported_prefix = "/usr/local" @@ -58,18 +61,18 @@ well_known_local_path = ("%s/share/locale/*/LC_MESSAGES/*unity*" % supported_pre def set_unity_env (): '''set variable environnement for unity to run''' - compiz_config_profile = 'unity' - os.environ['COMPIZ_CONFIG_PROFILE'] = 'ubuntu' + compiz_config_profile = UNITY_DEFAULT_PROFILE + os.environ['COMPIZ_CONFIG_PROFILE'] = COMPIZ_CONFIG_PROFILE try: if subprocess.call('/usr/lib/nux/unity_support_test -f'.split()) > 0: - compiz_config_profile += '-lowgfx' + compiz_config_profile = UNITY_LOWGFX_PROFILE except: pass try: if subprocess.check_output('gsettings get com.canonical.Unity lowgfx'.split()) == b'true\n': - compiz_config_profile += '-lowgfx' + compiz_config_profile = UNITY_LOWGFX_PROFILE except: pass |
