testing: migrate compute-levels.sh

this test wasn't even run

Change-Id: I735c8b2d2c63a65c665d6344a98ddb3bbbf94f43
This commit is contained in:
eldritch horrors
2026-02-27 17:42:17 +00:00
parent 298373615e
commit 378c86eadf
2 changed files with 11 additions and 7 deletions
-7
View File
@@ -1,7 +0,0 @@
source common.sh
if [[ $(uname -ms) = "Linux x86_64" ]]; then
# x86_64 CPUs must always support the baseline
# microarchitecture level.
nix -vv --version | grepQuiet "x86_64-v1-linux"
fi
@@ -0,0 +1,11 @@
import os
import sys
import pytest
from testlib.fixtures.nix import Nix
@pytest.mark.skipif(
sys.platform != "linux" or os.uname().machine != "x86_64", reason="uarch levels are x86_64 only"
)
def test_compute_levels(nix: Nix):
assert "x86_64-v1-linux" in nix.nix(["-vv", "--version"]).run().ok().stdout_plain