- # def test_versions(self):
- # info('test_versions')
- # if environ.get('FUNCTIONAL') != '1':
- # self.skipTest('skipped functional tests')
- # bld_branch = {'master': 'alpha', 'rc': 'rc', 'stable': 'stable'}[_branch()]
- # with open('/home/flavio/pmachines_builder/last_bld.txt') as f:
- # lines = f.readlines()
- # for line in lines:
- # if line.strip().split()[0] == _branch():
- # commit = line.strip().split()[1][:7]
- # _ver = ver
- # if _branch() == 'stable':
- # with open('/home/flavio/pmachines_builder/pmachines/assets/version.txt') as fver:
- # _ver = fver.read().strip() + '-'
- # exp = '%s-%s' % (_ver, commit)
- # cmds = [
- # ('./build/manylinux1_x86_64/pmachines --version', str(Filename.get_user_appdata_directory()) + '/pmachines/obs_version.txt'),
- # ('./dist/Pmachines-%s-x86_64.AppImage --version' % bld_branch, str(Filename.get_user_appdata_directory()) + '/pmachines/obs_version.txt'),
- # ('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')]
- # 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:
- # if exists(cmd[1]):
- # remove(cmd[1])
- # info('launching %s' % cmd[0])
- # exec_cmd(cmd[0])
- # with open(cmd[1]) as f:
- # obs = f.read().strip()
- # self.assertEqual(obs, exp)
+ def test_versions(self):
+ info('test_versions')
+ if environ.get('FUNCTIONAL') != '1':
+ self.skipTest('skipped functional tests')
+ bld_branch = {'master': 'alpha', 'rc': 'rc', 'stable': 'stable'}[_branch()]
+ with open('/home/flavio/builders/pmachines_builder/last_bld.txt') as f:
+ lines = f.readlines()
+ for line in lines:
+ if line.strip().split()[0] == _branch():
+ commit = line.strip().split()[1][:7]
+ _ver = ver
+ if _branch() == 'stable':
+ with open('/home/flavio/builders/pmachines_builder/pmachines/assets/version.txt') as fver:
+ _ver = fver.read().strip() + '-'
+ exp = '%s-%s' % (_ver, commit)
+ cmds = [
+ ('./build/manylinux1_x86_64/pmachines --version', str(Filename.get_user_appdata_directory()) + '/pmachines/obs_version.txt'),
+ ('./dist/Pmachines-%s-x86_64.AppImage --version' % bld_branch, str(Filename.get_user_appdata_directory()) + '/pmachines/obs_version.txt'),
+ ('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')]
+ 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:
+ if exists(cmd[1]):
+ remove(cmd[1])
+ info('launching %s' % cmd[0])
+ exec_cmd(cmd[0])
+ with open(cmd[1]) as f:
+ obs = f.read().strip()
+ self.assertEqual(obs, exp, 'during ' + cmd[0])