Skip to content

Commit

Permalink
squash: update
Browse files Browse the repository at this point in the history
  • Loading branch information
skycastlelily committed Oct 18, 2024
1 parent 9273f91 commit 39fc59d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tmt-1.38.0

The :ref:`/plugins/provision/beaker` provision plugin gains
support for :ref:`cpu.stepping</spec/hardware/cpu>` and
:ref:`beaker.speed</spec/hardware/beaker>` hardware requirements.
:ref:`cpu.frequency</spec/hardware/beaker>` hardware requirements.

The :ref:`/plugins/report/junit` report plugin now removes all
invalid XML characters from the final JUnit XML.
Expand Down
8 changes: 4 additions & 4 deletions spec/hardware/cpu.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ description: |
are also useful resources.

.. versionchanged:: 1.38
``beaker`` plugins supports ``speed`` and ``stepping``
``beaker`` plugins supports ``frequency`` and ``stepping``

.. versionchanged:: 1.35
``beaker`` plugins supports ``vendor-name``
Expand Down Expand Up @@ -115,9 +115,9 @@ example:
hyper-threading: true

- |
# Request a CPU with specified speed.
# Request a CPU with specified frequency.
cpu:
speed: ">= 2300"
frequency: ">= 2300.0"

- |
# Request a CPU with specified stepping.
Expand All @@ -126,6 +126,6 @@ example:

link:
- implemented-by: /tmt/steps/provision/artemis.py
note: "``cpu.vendor``, ``cpu.vendor-name`` and ``cpu.hyper-threading`` not implemented yet"
note: "``cpu.vendor``, ``cpu.vendor-name``, ``cpu.frequency`` and ``cpu.hyper-threading`` not implemented yet"
- implemented-by: /tmt/steps/provision/mrack.py
note: "``cpu.sockets``, ``cpu.threads``, ``cpu.cores-per-socket``, ``cpu.threads-per-core``, ``cpu.family`` not implemented yet"
2 changes: 1 addition & 1 deletion tests/unit/provision/mrack/test_hw.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def test_maximal_constraint(root_logger: Logger) -> None:
'cpu': {
'speed': {
'_op': '>=',
'_value': '2300',
'_value': '2300.0',
},
},
},
Expand Down
6 changes: 3 additions & 3 deletions tmt/steps/provision/mrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,12 @@ def _transform_cpu_model_name(
children=[MrackHWBinOp('model_name', beaker_operator, actual_value)])


def _transform_cpu_speed(
def _transform_cpu_frequency(
constraint: tmt.hardware.NumberConstraint,
logger: tmt.log.Logger) -> MrackBaseHWElement:
beaker_operator, actual_value, _ = operator_to_beaker_op(
constraint.operator,
str(constraint.value))
str(float(constraint.value.to('MHz').magnitude)))

return MrackHWGroup(
'cpu',
Expand Down Expand Up @@ -598,11 +598,11 @@ def _transform_system_numa_nodes(
'beaker.pool': _transform_beaker_pool, # type: ignore[dict-item]
'cpu.cores': _transform_cpu_cores, # type: ignore[dict-item]
'cpu.flag': _transform_cpu_flag, # type: ignore[dict-item]
'cpu.frequency': _transform_cpu_frequency, # type: ignore[dict-item]
'cpu.hyper_threading': _transform_cpu_hyper_threading, # type: ignore[dict-item]
'cpu.model': _transform_cpu_model, # type: ignore[dict-item]
'cpu.model_name': _transform_cpu_model_name, # type: ignore[dict-item]
'cpu.processors': _transform_cpu_processors, # type: ignore[dict-item]
'cpu.speed': _transform_cpu_speed, # type: ignore[dict-item]
'cpu.stepping': _transform_cpu_stepping, # type: ignore[dict-item]
'cpu.vendor_name': _transform_cpu_vendor_name, # type: ignore[dict-item]
'disk.driver': _transform_disk_driver, # type: ignore[dict-item]
Expand Down

0 comments on commit 39fc59d

Please sign in to comment.