Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Batmen Tools
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 Tools
Commits
3a5dd444
Commit
3a5dd444
authored
2 years ago
by
Maël Madon
Browse files
Options
Downloads
Patches
Plain Diff
some very simple tests
parent
373b8e6f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+3
-1
3 additions, 1 deletion
.gitignore
test/input/mock.swf
+607
-0
607 additions, 0 deletions
test/input/mock.swf
test/test_parsers.py
+21
-0
21 additions, 0 deletions
test/test_parsers.py
with
631 additions
and
1 deletion
.gitignore
+
3
−
1
View file @
3a5dd444
*__pycache__
\ No newline at end of file
*__pycache__
test-out
.vscode
\ No newline at end of file
This diff is collapsed.
Click to expand it.
test/input/mock.swf
0 → 100644
+
607
−
0
View file @
3a5dd444
This diff is collapsed.
Click to expand it.
test/test_parsers.py
0 → 100644
+
21
−
0
View file @
3a5dd444
from
batmenTools.swf2batsim_split_by_user
import
generate_workload
from
batmenTools.swf_filter
import
filter_workload
import
os.path
,
sys
,
subprocess
input_swf
=
os
.
path
.
abspath
(
"
test/input/mock.swf
"
)
output_dir
=
os
.
path
.
abspath
(
"
test-out
"
)
if
not
os
.
path
.
exists
(
output_dir
):
os
.
makedirs
(
output_dir
)
def
test_split_by_user
():
"""
Very simple test if split_by_user works without error
"""
generate_workload
(
input_swf
,
output_folder
=
output_dir
)
def
test_CLI
():
"""
Very simple test of the CLI of our different tools
"""
subprocess
.
run
([
sys
.
executable
,
"
batmenTools/swf2batsim_split_by_user.py
"
,
input_swf
,
output_dir
],
check
=
True
)
subprocess
.
run
([
sys
.
executable
,
"
batmenTools/swf_filter.py
"
,
input_swf
,
"
-o
"
,
f
"
{
output_dir
}
/bla.swf
"
],
check
=
True
)
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