Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linuxbin
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aerospace and Mechanical Engineering
linuxbin
Commits
30118b5f
Commit
30118b5f
authored
5 years ago
by
Boman Romain
Browse files
Options
Downloads
Patches
Plain Diff
modify comp.py for oo_meta/oo_nda on gitlab
parent
fd7289c8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
comp.py
+18
-7
18 additions, 7 deletions
comp.py
with
18 additions
and
7 deletions
comp.py
+
18
−
7
View file @
30118b5f
...
...
@@ -17,14 +17,16 @@ class Repo(object):
class
GitRepo
(
Repo
):
def
__init__
(
self
,
name
,
url
):
super
(
GitRepo
,
self
).
__init__
(
name
,
url
)
def
co_cmd
(
self
):
cmd
=
"
git clone --quiet %s %s
"
%
(
self
.
url
,
self
.
name
)
def
co_cmd
(
self
,
pars
):
cmd
=
"
git clone --branch %s --depth %s --quiet %s %s
"
%
\
(
pars
[
'
GIT_BRANCH
'
].
val
,
pars
[
'
GIT_DEPTH
'
].
val
,
self
.
url
,
self
.
name
)
return
cmd
class
SVNRepo
(
Repo
):
def
__init__
(
self
,
name
,
url
):
super
(
SVNRepo
,
self
).
__init__
(
name
,
url
)
def
co_cmd
(
self
):
def
co_cmd
(
self
,
pars
):
cmd
=
"
svn co --quiet %s %s
"
%
(
self
.
url
,
self
.
name
)
return
cmd
...
...
@@ -43,7 +45,7 @@ class CompJob(ParametricJob):
self
.
repos
=
[]
self
.
repos
.
append
(
GitRepo
(
'
oo_meta
'
,
'
git@gitlab.uliege.be:am-dept/MN2L/oo_meta.git
'
))
self
.
repos
.
append
(
GitRepo
(
'
oo_nda
'
,
'
git@gitlab.uliege.be:am-dept/MN2L/oo_nda.git
'
))
self
.
repos
.
append
(
GitRepo
(
'
linuxbin
'
,
'
https://
github.com
/
ulgltas/linuxbin.git
'
))
self
.
repos
.
append
(
GitRepo
(
'
linuxbin
'
,
'
git@
github.com
:
ulgltas/linuxbin.git
'
))
self
.
repos
.
append
(
GitRepo
(
'
parasolid
'
,
'
git@gitlab.uliege.be:am-dept/MN2L/parasolid.git
'
))
def
setDefaultPars
(
self
):
...
...
@@ -60,9 +62,12 @@ class CompJob(ParametricJob):
YesNoPRM
(
self
.
pars
,
'
DEBUG_MODE
'
,
'
debug mode
'
,
False
)
TextPRM
(
self
.
pars
,
'
NICE_VALUE
'
,
'
nice value
'
,
"
0
"
)
TextPRM
(
self
.
pars
,
'
NB_TASKS
'
,
'
nb of task launched in parallel
'
,
"
1
"
)
TextPRM
(
self
.
pars
,
'
NB_TASKS
'
,
'
nb of task
s
launched in parallel
'
,
"
1
"
)
TextPRM
(
self
.
pars
,
'
NB_THREADS
'
,
'
nb of threads by task
'
,
"
1
"
)
TextPRM
(
self
.
pars
,
'
GIT_DEPTH
'
,
'
git clone depth
'
,
'
10
'
)
TextPRM
(
self
.
pars
,
'
GIT_BRANCH
'
,
'
git branch name
'
,
'
master
'
)
MultiPRM
(
self
.
pars
,
'
RUNMETHOD
'
,
'
Run Method
'
,
[
"
interactive
"
,
"
at
"
,
"
batch
"
],
"
batch
"
)
TextPRM
(
self
.
pars
,
'
AT_TIME
'
,
'
Delay for at launch (no syntax check, use with care)
'
,
"
now
"
)
...
...
@@ -75,6 +80,9 @@ class CompJob(ParametricJob):
PRMAction
(
self
.
actions
,
'
c
'
,
self
.
pars
[
'
CMAKELIST
'
])
PRMAction
(
self
.
actions
,
'
d
'
,
self
.
pars
[
'
DEBUG_MODE
'
])
PRMAction
(
self
.
actions
,
'
e
'
,
self
.
pars
[
'
GIT_DEPTH
'
])
PRMAction
(
self
.
actions
,
'
f
'
,
self
.
pars
[
'
GIT_BRANCH
'
])
PRMAction
(
self
.
actions
,
'
h
'
,
self
.
pars
[
'
NICE_VALUE
'
])
PRMAction
(
self
.
actions
,
'
j
'
,
self
.
pars
[
'
NB_TASKS
'
])
PRMAction
(
self
.
actions
,
'
k
'
,
self
.
pars
[
'
NB_THREADS
'
])
...
...
@@ -100,6 +108,8 @@ class CompJob(ParametricJob):
self
.
pars
[
'
CMAKELIST
'
].
enable
(
self
.
pars
[
'
COMPILE
'
].
val
==
True
)
self
.
pars
[
'
DEBUG_MODE
'
].
enable
(
self
.
pars
[
'
COMPILE
'
].
val
==
True
)
self
.
pars
[
'
NICE_VALUE
'
].
enable
(
self
.
pars
[
'
BATTERY
'
].
val
!=
False
and
self
.
pars
[
'
RUNMETHOD
'
].
val
!=
'
sge
'
)
self
.
pars
[
'
GIT_DEPTH
'
].
enable
(
self
.
pars
[
'
UNZIP
'
].
val
==
"
checkout
"
)
self
.
pars
[
'
GIT_BRANCH
'
].
enable
(
self
.
pars
[
'
UNZIP
'
].
val
==
"
checkout
"
)
# Batch
self
.
pars
[
'
AT_TIME
'
].
enable
(
self
.
pars
[
'
RUNMETHOD
'
].
val
==
'
at
'
)
...
...
@@ -114,7 +124,8 @@ class CompJob(ParametricJob):
for
repo
in
self
.
repos
:
if
not
os
.
path
.
isdir
(
repo
.
name
):
print
'
checking out
"
%s
"
from %s...
'
%
(
repo
.
name
,
repo
.
url
)
cmd
=
repo
.
co_cmd
()
cmd
=
repo
.
co_cmd
(
self
.
pars
)
print
cmd
os
.
system
(
cmd
)
def
doClean
(
self
):
...
...
@@ -273,7 +284,7 @@ if __name__ == "__main__":
try
:
import
signal
signal
.
signal
(
signal
.
SIGBREAK
,
sigbreak
)
;
signal
.
signal
(
signal
.
SIGBREAK
,
sigbreak
)
except
:
pass
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment