Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
batmen
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sepia-pub
mael
batmen
Commits
a962d7c5
Commit
a962d7c5
authored
2 years ago
by
Maël Madon
Browse files
Options
Downloads
Patches
Plain Diff
refac: renamed and split the test scheduler in two fonctions
parent
49bf8ed1
No related branches found
No related tags found
1 merge request
!5
New dynamic schedulers: fcfs and easy-bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/conftest.py
+0
-7
0 additions, 7 deletions
test/conftest.py
test/test_schedulers.py
+46
-0
46 additions, 0 deletions
test/test_schedulers.py
with
46 additions
and
7 deletions
test/conftest.py
+
0
−
7
View file @
a962d7c5
...
...
@@ -23,13 +23,6 @@ def pytest_generate_tests(metafunc):
filename
=
abspath
(
workload_file
))
for
workload_file
in
workload_files
]
metafunc
.
parametrize
(
'
workload_static
'
,
workloads
)
if
'
basic_algo_no_param
'
in
metafunc
.
fixturenames
:
algos
=
[
'
easy_bf
'
,
'
fcfs
'
]
metafunc
.
parametrize
(
'
basic_algo_no_param
'
,
algos
)
if
'
platform_multiC
'
in
metafunc
.
fixturenames
:
platform_files
=
glob
.
glob
(
'
test/platforms/multicore/*.xml
'
)
platforms
=
[
Platform
(
...
...
This diff is collapsed.
Click to expand it.
test/test_
runn
er.py
→
test/test_
schedul
er
s
.py
+
46
−
0
View file @
a962d7c5
...
...
@@ -6,14 +6,37 @@ import unittest
from
helper
import
*
def
test_basic_algo_no_param
(
platform_monoC
,
workload_static
,
basic_algo_no_param
):
test_name
=
f
'
{
basic_algo_no_param
}
-
{
platform_monoC
.
name
}
-
{
workload_static
.
name
}
'
def
test_fcfs
(
platform_monoC
,
workload_static
):
"""
Tests the scheduler fcfs with different platform and workload files
"""
sched
=
"
fcfs
"
test_name
=
f
'
{
sched
}
-
{
platform_monoC
.
name
}
-
{
workload_static
.
name
}
'
output_dir
,
robin_filename
,
_
=
init_instance
(
test_name
)
batcmd
=
gen_batsim_cmd
(
platform_monoC
.
filename
,
workload_static
.
filename
,
output_dir
,
""
)
instance
=
RobinInstance
(
output_dir
=
output_dir
,
batcmd
=
batcmd
,
schedcmd
=
f
"
batmen -v
'
{
basic_algo_no_param
}
'"
,
schedcmd
=
f
"
batmen -v
'
{
sched
}
'"
,
simulation_timeout
=
30
,
ready_timeout
=
5
,
success_timeout
=
10
,
failure_timeout
=
0
)
instance
.
to_file
(
robin_filename
)
ret
=
run_robin
(
robin_filename
)
assert
ret
.
returncode
==
0
def
test_easy_bf
(
platform_monoC
,
workload_static
):
"""
Tests the scheduler easy backfilling with different platform and workload files
"""
sched
=
"
easy_bf
"
test_name
=
f
'
{
sched
}
-
{
platform_monoC
.
name
}
-
{
workload_static
.
name
}
'
output_dir
,
robin_filename
,
_
=
init_instance
(
test_name
)
batcmd
=
gen_batsim_cmd
(
platform_monoC
.
filename
,
workload_static
.
filename
,
output_dir
,
""
)
instance
=
RobinInstance
(
output_dir
=
output_dir
,
batcmd
=
batcmd
,
schedcmd
=
f
"
batmen -v
'
{
sched
}
'"
,
simulation_timeout
=
30
,
ready_timeout
=
5
,
success_timeout
=
10
,
failure_timeout
=
0
)
...
...
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