-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cijoe): merge
cijoe-pkg-*
into cijoe
Closes #61 Signed-off-by: Nadja Brix Koch <n.koch@samsung.com>
- Loading branch information
1 parent
7d0a3e2
commit c5d5ecd
Showing
53 changed files
with
1,755 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Declaration of where fio is located on the test-target and which IO-engines it has available | ||
[fio] | ||
bin = "{{ local.env.HOME }}/opt/fio/bin/fio" | ||
|
||
[fio.repository] | ||
upstream = "https://github.com/axboe/fio.git" | ||
path = "{{ local.env.HOME }}/git/fio" | ||
|
||
[fio.build] | ||
prefix = "{{ local.env.HOME }}/opt/fio" | ||
|
||
[fio.engines.libaio] | ||
type = "builtin" | ||
|
||
[fio.engines.io_uring] | ||
type = "builtin" | ||
|
||
[fio.engines.io_uring_cmd] | ||
type = "builtin" | ||
|
||
[fio.engines.xnvme] | ||
path = "/usr/local/lib/x86_64-linux-gnu/libxnvme-fio-engine.so" | ||
type = "external_dynamic" | ||
|
||
[fio.engines.spdk_nvme] | ||
path = "/opt/aux/spdk_nvme" | ||
type = "external_preload" | ||
|
||
[fio.engines.spdk_bdev] | ||
path = "/opt/aux/spdk_bdev" | ||
type = "external_preload" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
build fio | ||
========= | ||
Build fio in fio.repository.path, using prefix fio.build.prefix. | ||
Retargetable: True | ||
------------------ | ||
""" | ||
from pathlib import Path | ||
|
||
|
||
def main(args, cijoe, step): | ||
"""Install qemu""" | ||
|
||
commands = [ | ||
"make clean", | ||
f"./configure --prefix={ cijoe.config.options['fio']['build']['prefix'] }", | ||
"make -j $(nproc)", | ||
] | ||
for cmd in commands: | ||
err, _ = cijoe.run( | ||
cmd, cwd=Path(cijoe.config.options["fio"]["repository"]["path"]) | ||
) | ||
if err: | ||
return err | ||
|
||
return err |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
check fio | ||
========= | ||
Check the version of the wrapped fio. This is useful for reference and as a check that | ||
fio-wrapper has the correct options set. | ||
Retargetable: True | ||
------------------ | ||
""" | ||
from cijoe.fio.wrapper import fio | ||
|
||
|
||
def main(args, cijoe, step): | ||
"""Check version of fio""" | ||
|
||
err, _ = fio(cijoe, "--help") | ||
|
||
return err |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
install fio | ||
=========== | ||
Just a plain 'make install' within 'repository.path' | ||
Retargetable: True | ||
------------------ | ||
""" | ||
from pathlib import Path | ||
|
||
|
||
def main(args, cijoe, step): | ||
"""Install fio""" | ||
|
||
err, _ = cijoe.run( | ||
"make install", cwd=Path(cijoe.config.options["fio"]["repository"]["path"]) | ||
) | ||
return err |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import cijoe.linux.null_blk as null_blk | ||
import pytest | ||
|
||
import cijoe.fio.wrapper as fio | ||
|
||
|
||
def skip_when_config_has_no_remote(cijoe): | ||
"""Skip testing when configuration is module not enabled""" | ||
|
||
transport = cijoe.config.options.get("transport", None) | ||
if not transport: | ||
pytest.skip(reason="skipping as there is no remote transport defined") | ||
|
||
|
||
def test_run(cijoe): | ||
|
||
skip_when_config_has_no_remote(cijoe) | ||
|
||
err, _ = null_blk.insert(cijoe) | ||
assert not err | ||
|
||
err, _ = fio.run( | ||
cijoe, | ||
[ | ||
"--filename", | ||
"/dev/nullb0", | ||
"--bs", | ||
"4k", | ||
"--rw", | ||
"randread", | ||
"--size", | ||
"1G", | ||
"--name", | ||
"foo42", | ||
], | ||
) | ||
assert not err |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
doc: | | ||
This workflow demonstrates how to use build and install fio via cijoe | ||
|
||
steps: | ||
- name: build | ||
uses: fio.build | ||
|
||
- name: install | ||
uses: fio.install | ||
|
||
- name: check | ||
uses: fio.check |
Oops, something went wrong.