Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Poulpe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
octobus
Poulpe
Commits
2c1c0d7f
Commit
2c1c0d7f
authored
1 month ago
by
Raphaël Gomès
Browse files
Options
Downloads
Patches
Plain Diff
setup-poulpe-den: add the ability to select suites you want to install
parent
204b5dab
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/setup-poulpe-den
+18
-10
18 additions, 10 deletions
bin/setup-poulpe-den
with
18 additions
and
10 deletions
bin/setup-poulpe-den
+
18
−
10
View file @
2c1c0d7f
...
...
@@ -6,5 +6,5 @@
import
subprocess
import
glob
from
pathlib
import
Path
from
typing
import
List
...
...
@@ -10,5 +10,6 @@
USAGE
=
"
USAGE: %s ROOTPATH
"
%
os
.
path
.
basename
(
sys
.
argv
[
0
])
import
click
POULPE_DIR
=
Path
(
__file__
).
resolve
().
parent
.
parent
...
...
@@ -164,7 +165,16 @@
subprocess
.
run
(
command
,
check
=
True
,
env
=
environ
)
def
setup_base_dir
(
path
):
@click.command
(
no_args_is_help
=
True
)
@click.argument
(
"
path
"
)
@click.option
(
"
--suite
"
,
"
-s
"
,
"
suites
"
,
multiple
=
True
,
help
=
"
Suites to set up, defaults to all
"
,
)
def
setup_base_dir
(
path
:
str
,
suites
:
List
[
str
]):
base_path
=
Path
(
path
).
resolve
()
print
(
"
Creating folders
"
)
base_path
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
...
...
@@ -197,7 +207,10 @@
print
(
"
Cloning repositories to benchmark
"
)
repos
=
base_path
/
REPOSITORIES_DIR
for
listing
in
glob
.
glob
(
str
(
base_path
/
'
suites
'
/
'
*
'
/
'
repositories
'
)):
suite_name
=
Path
(
listing
).
parent
.
parent
.
name
suite_name
=
Path
(
listing
).
parent
.
name
if
suites
and
suite_name
not
in
suites
:
print
(
f
"
Skipping suite
{
suite_name
}
as requested
"
)
continue
with
open
(
listing
)
as
f
:
for
line
in
f
:
line
=
line
.
strip
()
...
...
@@ -224,9 +237,4 @@
if
__name__
==
"
__main__
"
:
if
len
(
sys
.
argv
)
!=
2
or
sys
.
argv
[
1
].
startswith
(
'
-
'
):
print
(
USAGE
,
file
=
sys
.
stderr
)
sys
.
exit
(
128
)
else
:
ret
=
setup_base_dir
(
sys
.
argv
[
1
])
sys
.
exit
(
ret
)
setup_base_dir
()
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