Commit 3cff70f9 authored by François Bailly's avatar François Bailly
Browse files

script now compatible python27 and robotpkg/wip clone is handled

parent 9b9248d5
Pipeline #2564 failed with stages
in 1 minute and 28 seconds
#!/usr/bin/python3 #!/usr/bin/python3
# -*- coding:utf-8 -*-
from robotpkg_tests import RobotpkgTests from robotpkg_tests import RobotpkgTests
arch_release_candidates= [ ('dynamic-graph-v3','rc-v3.2.2'), arch_release_candidates= [ ('dynamic-graph-v3','rc-v3.2.2'),
('py-dynamic-graph-v3','devel'), ('py-dynamic-graph-v3','devel'),
('sot-core-v3','rc-v3.3.1'), ('sot-core-v3','rc-v3.3.1'),
...@@ -11,7 +13,7 @@ arch_release_candidates= [ ('dynamic-graph-v3','rc-v3.2.2'), ...@@ -11,7 +13,7 @@ arch_release_candidates= [ ('dynamic-graph-v3','rc-v3.2.2'),
('talos-metapkg-ros-control-sot','devel')] ('talos-metapkg-ros-control-sot','devel')]
ROBOTPKG_ROOT='/home/fbailly/devel/robotpkg-test-rc' ROBOTPKG_ROOT='/local/fbailly/devel/robotpkg-test-rc'
arpgtestrc =RobotpkgTests(ROBOTPKG_ROOT) arpgtestrc =RobotpkgTests(ROBOTPKG_ROOT)
arpgtestrc.perform_test_rc(arch_release_candidates) arpgtestrc.perform_test_rc(arch_release_candidates)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import subprocess import subprocess
import os import os
import socket import socket
import scandir
from pathlib import Path from pathlib import Path
class RobotpkgTests: class RobotpkgTests:
...@@ -159,7 +160,7 @@ class RobotpkgTests: ...@@ -159,7 +160,7 @@ class RobotpkgTests:
env=self.env) env=self.env)
outputdata, error = process.communicate() outputdata, error = process.communicate()
for stdout_line in outputdata.splitlines(): for stdout_line in outputdata.splitlines():
print(stdout_line.decode('ascii')) print(stdout_line.decode('utf-8'))
return outputdata return outputdata
def prepare_robotpkg(self,wip_repository): def prepare_robotpkg(self,wip_repository):
...@@ -183,9 +184,9 @@ class RobotpkgTests: ...@@ -183,9 +184,9 @@ class RobotpkgTests:
""" """
print(self.GREEN+'Creating the repositories'+self.NC) print(self.GREEN+'Creating the repositories'+self.NC)
dirname=self.ROBOTPKG_ROOT+'/' dirname=self.ROBOTPKG_ROOT+'/'
os.makedirs(dirname,0o777,True) os.makedirs(dirname,0o777)
dirname=self.ROBOTPKG_ROOT+'/install' dirname=self.ROBOTPKG_ROOT+'/install'
os.makedirs(dirname,0o777,True) os.makedirs(dirname,0o777)
def cloning_robotpkg_main(self): def cloning_robotpkg_main(self):
"""Clones the main robotpkg repository""" """Clones the main robotpkg repository"""
...@@ -266,7 +267,7 @@ class RobotpkgTests: ...@@ -266,7 +267,7 @@ class RobotpkgTests:
os.chdir(checkoutdir_packagename) os.chdir(checkoutdir_packagename)
# If it does then maybe this is not a git directory # If it does then maybe this is not a git directory
folders=[f.path for f in os.scandir(checkoutdir_packagename) if f.is_dir()] folders=[f.path for f in scandir.scandir(checkoutdir_packagename) if f.is_dir()]
for folder in folders: for folder in folders:
if self.debug>3: if self.debug>3:
print("Going into: "+folder) print("Going into: "+folder)
...@@ -311,7 +312,7 @@ class RobotpkgTests: ...@@ -311,7 +312,7 @@ class RobotpkgTests:
""" """
bashcmd='git checkout '+branchname bashcmd='git checkout '+branchname
checkoutdir_packagename=self.build_rpkg_checkout_package(packagename) checkoutdir_packagename=self.build_rpkg_checkout_package(packagename)
folders=[f.path for f in os.scandir(checkoutdir_packagename) if f.is_dir()] folders=[f.path for f in scandir.scandir(checkoutdir_packagename) if f.is_dir()]
for folder in folders: for folder in folders:
if self.debug>3: if self.debug>3:
print("Going into: "+folder) print("Going into: "+folder)
...@@ -347,7 +348,7 @@ class RobotpkgTests: ...@@ -347,7 +348,7 @@ class RobotpkgTests:
arch_release_candidates: tuple of pair [ ('package_name','branch_name'), ... ] arch_release_candidates: tuple of pair [ ('package_name','branch_name'), ... ]
""" """
wip_repository="ssh://git@git.openrobots.org/robots/robotpkg/robotpkg-wip wip" wip_repository="ssh://git@git.openrobots.org/robots/robotpkg/robotpkg-wip wip"
wip_repository="https://git.openrobots.org/robots/robotpkg/robotpkg-wip.git" wip_repository="https://git.openrobots.org/robots/robotpkg/robotpkg-wip.git wip"
self.prepare_robotpkg(wip_repository) self.prepare_robotpkg(wip_repository)
for package_name,branch_name in arch_release_candidates: for package_name,branch_name in arch_release_candidates:
self.handle_package(package_name,branch_name) self.handle_package(package_name,branch_name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment