Skip to content

Commit

Permalink
Fix Java, Godot, Blender, RStudio urls
Browse files Browse the repository at this point in the history
Remove icon pinning in launcher (only worked on Unity)
Add Logic section with Protegé
  • Loading branch information
LyzardKing committed Oct 6, 2023
1 parent fd88eff commit 9a99605
Show file tree
Hide file tree
Showing 24 changed files with 175 additions and 192 deletions.
6 changes: 1 addition & 5 deletions tests/large/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import stat
import subprocess
from time import sleep
from umake.tools import get_icon_path, get_launcher_path, launcher_exists_and_is_pinned, remove_framework_envs_from_user
from umake.tools import get_icon_path, get_launcher_path, remove_framework_envs_from_user
from ..tools import LoggedTestCase, get_path_from_desktop_file, is_in_group, INSTALL_DIR, swap_file_and_restore, \
spawn_process, set_local_umake, BRANCH_TESTS
from umake.settings import DEFAULT_BINARY_LINK_PATH
Expand Down Expand Up @@ -204,10 +204,6 @@ def get_launcher_path(self, desktop_filename):
"""passthrough getting the launcher path from umake tools"""
return get_launcher_path(desktop_filename)

def launcher_exists_and_is_pinned(self, desktop_filename):
"""passthrough to in process method"""
return launcher_exists_and_is_pinned(desktop_filename)

def path_exists(self, path):
"""passthrough to os.path.exists"""
return os.path.exists(path)
Expand Down
2 changes: 1 addition & 1 deletion tests/large/test_android.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_default_android_studio_install(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()
self.assert_icon_exists()
self.assert_exec_link_exists()
Expand Down
52 changes: 26 additions & 26 deletions tests/large/test_baseinstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_default_install(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()
self.assert_icon_exists()
self.assert_exec_link_exists()
Expand All @@ -121,7 +121,7 @@ def test_no_license_accept(self):
self.accept_default_and_wait()
self.close_and_check_status()

self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertFalse(self.launcher_exists(self.desktop_filename))

def test_doesnt_accept_wrong_path(self):
"""We don't accept a wrong path"""
Expand All @@ -134,7 +134,7 @@ def test_doesnt_accept_wrong_path(self):
self.child.sendcontrol('C')
self.wait_and_no_warn()

self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertFalse(self.launcher_exists(self.desktop_filename))

def test_reinstall(self):
"""Reinstall once installed"""
Expand All @@ -152,7 +152,7 @@ def test_reinstall(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()

# launch it, send SIGTERM and check that it exits fine
Expand Down Expand Up @@ -180,7 +180,7 @@ def test_reinstall_other_path(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()

# ensure that version first isn't installed anymore
Expand Down Expand Up @@ -213,7 +213,7 @@ def test_reinstall_other_non_empty_path(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()

# ensure that version first isn't installed anymore
Expand All @@ -236,7 +236,7 @@ def test_reinstall_previous_install_removed(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()

def test_reinstall_previous_launcher_removed(self):
Expand All @@ -259,7 +259,7 @@ def test_reinstall_previous_launcher_removed(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()

def test_xdg_data_install_path(self):
Expand All @@ -276,7 +276,7 @@ def test_xdg_data_install_path(self):
self.expect_and_no_warn(r"\[I Accept.*\]")
self.accept_default_and_wait()
self.close_and_check_status()
self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertFalse(self.launcher_exists(self.desktop_filename))

def test_custom_install_path(self):
"""We install Base Framework in a custom path"""
Expand All @@ -289,7 +289,7 @@ def test_custom_install_path(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()
self.assert_icon_exists()

Expand All @@ -311,7 +311,7 @@ def test_start_install_on_empty_dir(self):
self.accept_default_and_wait()
self.close_and_check_status()

self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertFalse(self.launcher_exists(self.desktop_filename))

def test_start_install_on_existing_dir_refuse(self):
"""We prompt if we try to install on an existing directory which isn't empty. Refusing doesn't install"""
Expand All @@ -325,7 +325,7 @@ def test_start_install_on_existing_dir_refuse(self):
self.accept_default_and_wait()
self.close_and_check_status()

self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertFalse(self.launcher_exists(self.desktop_filename))

def test_start_install_on_existing_dir_accept(self):
"""We prompt if we try to install on an existing directory which isn't empty. Accepting install"""
Expand All @@ -343,7 +343,7 @@ def test_start_install_on_existing_dir_accept(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()
self.assert_icon_exists()

Expand Down Expand Up @@ -386,7 +386,7 @@ def test_is_default_framework_with_user_path(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()
self.assert_icon_exists()

Expand All @@ -406,14 +406,14 @@ def test_removal(self):
self.child.sendline("a")
self.expect_and_no_warn(r"Installation done", timeout=self.TIMEOUT_INSTALL_PROGRESS)
self.wait_and_close()
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assertTrue(self.path_exists(self.installed_path))

# now, remove it
self.child = spawn_process(self.command('{} base base-framework --remove'.format(UMAKE)))
self.wait_and_close()

self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertFalse(self.launcher_exists(self.desktop_filename))
self.assertFalse(self.path_exists(self.installed_path))
self.assertFalse(self.path_exists(os.path.dirname(self.installed_path)))
self.assertFalse(self.path_exists(self.exec_link))
Expand All @@ -426,14 +426,14 @@ def test_removal_non_default_path(self):
self.child.sendline("a")
self.expect_and_no_warn(r"Installation done", timeout=self.TIMEOUT_INSTALL_PROGRESS)
self.wait_and_close()
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assertTrue(self.path_exists(self.installed_path))

# now, remove it
self.child = spawn_process(self.command('{} base base-framework --remove'.format(UMAKE)))
self.wait_and_close()

self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertFalse(self.launcher_exists(self.desktop_filename))
self.assertFalse(self.path_exists(self.installed_path))

def test_removal_global_option(self):
Expand All @@ -445,14 +445,14 @@ def test_removal_global_option(self):
self.child.sendline("a")
self.expect_and_no_warn(r"Installation done", timeout=self.TIMEOUT_INSTALL_PROGRESS)
self.wait_and_close()
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assertTrue(self.path_exists(self.installed_path))

# now, remove it
self.child = spawn_process(self.command('{} --remove base base-framework'.format(UMAKE)))
self.wait_and_close()

self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertFalse(self.launcher_exists(self.desktop_filename))
self.assertFalse(self.path_exists(self.installed_path))
self.assertFalse(self.path_exists(os.path.dirname(self.installed_path)))

Expand All @@ -464,7 +464,7 @@ def test_automated_install(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()

def test_try_removing_uninstalled_framework(self):
Expand All @@ -489,13 +489,13 @@ def test_install_with_wrong_md5sum(self):
self.wait_and_close(exit_status=1)

# we have nothing installed
self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertFalse(self.launcher_exists(self.desktop_filename))

def test_install_with_no_license_in_download_page(self):
"""Installing should fail if license is not in download page"""
umake_command = self.command("{} base base-framework".format(UMAKE))
self.bad_download_page_test(umake_command, self.download_page_file_path)
self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertFalse(self.launcher_exists(self.desktop_filename))

def test_install_with_no_download_links(self):
"""Installing should fail if no valid download links are found"""
Expand All @@ -509,7 +509,7 @@ def test_install_with_no_download_links(self):
self.wait_and_close(exit_status=1)

# we have nothing installed
self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertFalse(self.launcher_exists(self.desktop_filename))

def test_install_with_404(self):
"""Installing should fail with a 404 download asset reported correctly"""
Expand All @@ -527,7 +527,7 @@ def test_install_with_404(self):
self.wait_and_close(exit_status=1)

# we have nothing installed
self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertFalse(self.launcher_exists(self.desktop_filename))

def test_download_page_404(self):
"""Download page changed address or is just 404 should be reported correctly"""
Expand All @@ -541,4 +541,4 @@ def test_download_page_404(self):
self.wait_and_close(exit_status=1)

# we have nothing installed
self.assertFalse(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertFalse(self.launcher_exists(self.desktop_filename))
4 changes: 2 additions & 2 deletions tests/large/test_electronics.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_default_install(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher and an icon file
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()
self.assert_icon_exists()
self.assertTrue(self.is_in_group("dialout"))
Expand Down Expand Up @@ -99,7 +99,7 @@ def test_default_eclipse_ide_install(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher and an icon file
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()
self.assert_icon_exists()
self.assert_exec_link_exists()
Expand Down
12 changes: 6 additions & 6 deletions tests/large/test_games.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_default_blender_install(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()
self.assert_icon_exists()
self.assert_exec_link_exists()
Expand Down Expand Up @@ -95,7 +95,7 @@ def test_default_unity3D_install(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()
self.assert_icon_exists()
self.assert_exec_link_exists()
Expand Down Expand Up @@ -140,7 +140,7 @@ def test_default_twine_install(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()
self.assert_icon_exists()
self.assert_exec_link_exists()
Expand Down Expand Up @@ -182,7 +182,7 @@ def test_default_superpowers_install(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()
self.assert_icon_exists()
self.assert_exec_link_exists()
Expand Down Expand Up @@ -224,7 +224,7 @@ def test_default_gdevelop_install(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()
self.assert_icon_exists()
self.assert_exec_link_exists()
Expand Down Expand Up @@ -266,7 +266,7 @@ def test_default_godot_install(self):
self.wait_and_close()

# we have an installed launcher, added to the launcher
self.assertTrue(self.launcher_exists_and_is_pinned(self.desktop_filename))
self.assertTrue(self.launcher_exists(self.desktop_filename))
self.assert_exec_exists()
self.assert_icon_exists()
self.assert_exec_link_exists()
Expand Down
Loading

0 comments on commit 9a99605

Please sign in to comment.