From: Flavio Calva Date: Thu, 4 Aug 2022 18:32:52 +0000 (+0100) Subject: refinements (building) X-Git-Url: http://git.ya2.it/?p=pmachines.git;a=commitdiff_plain refinements (building) --- diff --git a/tests/test_functional.py b/tests/test_functional.py index 73a0c9e..def76b5 100644 --- a/tests/test_functional.py +++ b/tests/test_functional.py @@ -18,6 +18,10 @@ from ya2.build.build import exec_cmd, _branch, _version class FunctionalTests(TestCase): + def __init__(self, *args, **kwargs): + super(FunctionalTests, self).__init__(*args, **kwargs) + self.__itchio_updated = False + def __clean(self): paths = [ 'tests/functional', @@ -114,6 +118,8 @@ class FunctionalTests(TestCase): def test_code(self): info('test_code') + if environ.get('FUNCTIONALPOST') == '1': + self.skipTest('skipped functional-post test: test_code') self.__test_template( '/home/flavio/venv/bin/python main.py --functional-test', ['/home/flavio/venv/bin/python -m tests.functional_test.py 1', @@ -122,6 +128,8 @@ class FunctionalTests(TestCase): def test_appimage(self): info('test_appimage') + if environ.get('FUNCTIONALPOST') == '1': + self.skipTest('skipped functional-post test: test_appimage') bld_branch = {'master': 'alpha', 'rc': 'rc', 'stable': 'stable'}[_branch()] bld_branch = '' if bld_branch == 'stable' else ('-' + bld_branch) self.__test_template( @@ -149,6 +157,9 @@ class FunctionalTests(TestCase): # str(Path.home()) + '/.var/app/it.ya2.Pmachines/data/pmachines/tests/functional/') def __update_itchio(self): + info('update_itchio::itchio_updated::cond: %s' % str(self.__itchio_updated)) + if self.__itchio_updated: + return system('/home/flavio/.itch/itch') sleep(120) system('xdotool mousemove 860 620') @@ -156,6 +167,8 @@ class FunctionalTests(TestCase): system('xdotool click 1') sleep(300) system('killall itch') + self.__itchio_updated = True + info('update_itchio::itchio_updated::done: %s' % str(self.__itchio_updated)) def test_itchio(self): info('test_itchio') @@ -172,6 +185,8 @@ class FunctionalTests(TestCase): def test_windows(self): info('test_windows') + if environ.get('FUNCTIONALPOST') == '1': + self.skipTest('skipped functional-post test: test_windows') system('pkill -f "pmachines.exe"') abspath = str(Path(__file__).parent.parent) + '/build/win_amd64/pmachines.exe' self.__test_template(