ya2 · news · projects · code · about

support for itch.io
authorFlavio Calva <f.calva@gmail.com>
Sat, 16 Apr 2022 10:12:06 +0000 (12:12 +0200)
committerFlavio Calva <f.calva@gmail.com>
Sat, 16 Apr 2022 10:12:06 +0000 (12:12 +0200)
assets/version.txt [new file with mode: 0644]
prj.org
tests/test_functional.py

diff --git a/assets/version.txt b/assets/version.txt
new file mode 100644 (file)
index 0000000..59dc611
--- /dev/null
@@ -0,0 +1 @@
+0.220416.0
diff --git a/prj.org b/prj.org
index 02549aeea4d09c48cbc9faa53528c5c577f56baf..ee3b9cc5c94d1a0eb5cb5ecbc11fd5da1389599c 100644 (file)
--- a/prj.org
+++ b/prj.org
@@ -14,9 +14,9 @@
     - [X] windows
     - [X] flatpak
     - [X] versions
-    - [ ] itchio
+    - [X] itchio
 ** READY messenger.send('force_win') and messenger.send('force_fail')
-** READY management of error and success (upload builds, itch.io)
+** READY management of error and success (upload builds, server script)
 ** READY crontab
 * READY fix level 6 to something that can be systematically tested      :bug:
 * READY fix level 7 to something that can be systematically tested      :bug:
index 4b9f8b97b41cb8eb33b7216d720ff344d2941277..2971f05e97545607e96a167b6229e555c15eab3a 100644 (file)
@@ -116,26 +116,26 @@ class FunctionalTests(TestCase):
             'flatpak run it.ya2.Pmachines//%s --functional-test 2' % (bld_branch, bld_branch),
             str(Path.home()) + '/.var/app/it.ya2.Pmachines/data/pmachines/tests/functional/')
 
-    def __update_itchio(self):
-        system('/home/flavio/.itch/itch')
-        sleep(5)
-    #     system('xdotool mousemove 1280 620')
-        sleep(1)
-        system('xdotool click 1')
-        sleep(300)
-        system('killall itch')
-
-    def test_itchio(self):
-        info('test_itchio')
-        if environ.get('FUNCTIONALPOST') != '1':
-            self.skipTest('skipped functional-post tests')
-        if _branch() != 'master':
-            return
-        self.__update_itchio()
-        self.__test_template(
-            '/home/flavio/.config/itch/apps/pmachines/pmachines --functional-test 1 ;'
-            '/home/flavio/.config/itch/apps/pmachines/pmachines --functional-test 2',
-            str(Path.home()) + '/.local/share/pmachines/tests/functional/')
+    def __update_itchio(self):
+        system('/home/flavio/.itch/itch')
+        sleep(5)
+        system('xdotool mousemove 860 620')
+        sleep(1)
+        system('xdotool click 1')
+        sleep(300)
+        system('killall itch')
+
+    def test_itchio(self):
+        info('test_itchio')
+        if environ.get('FUNCTIONALPOST') != '1':
+            self.skipTest('skipped functional-post tests')
+        if _branch() != 'master':
+            return
+        self.__update_itchio()
+        self.__test_template(
+            '/home/flavio/.config/itch/apps/pmachines/pmachines --functional-test 1 ;'
+            '/home/flavio/.config/itch/apps/pmachines/pmachines --functional-test 2',
+            str(Path.home()) + '/.local/share/pmachines/tests/functional/')
 
     def test_windows(self):
         info('test_windows')
@@ -167,9 +167,9 @@ class FunctionalTests(TestCase):
             ('timeout 720s wine ./build/win_amd64/pmachines.exe --version', '/home/flavio/.wine/drive_c/users/flavio/AppData/Local/pmachines/obs_version.txt')
             ]
         if environ.get('FUNCTIONALPOST') == '1':
-            if _branch() == 'master':
-                self.__update_itchio()
-                cmds += [('/home/flavio/.config/itch/apps/pmachines/pmachines --version', str(Filename.get_user_appdata_directory()) + '/pmachines/obs_version.txt')]
+            if _branch() == 'master':
+                self.__update_itchio()
+                cmds += [('/home/flavio/.config/itch/apps/pmachines/pmachines --version', str(Filename.get_user_appdata_directory()) + '/pmachines/obs_version.txt')]
             cmds += [('flatpak run it.ya2.Pmachines//%s --version' % bld_branch, '/home/flavio/.var/app/it.ya2.Pmachines/data/pmachines/obs_version.txt')]
         system('flatpak update -y it.ya2.Pmachines//%s' % bld_branch)
         for cmd in cmds: