testing: migrate output-normalization.sh

Change-Id: I51a021b27fa27b531bb49b8529bae2e9bf74641a
This commit is contained in:
eldritch horrors
2026-02-27 17:42:17 +00:00
parent b2ae7c3965
commit 14d8209198
3 changed files with 11 additions and 10 deletions
-1
View File
@@ -99,7 +99,6 @@ functional_tests_scripts = [
'derivation-json.sh',
'import-derivation.sh',
'ssh-relay.sh',
'output-normalization.sh',
'selfref-gc.sh',
'db-migration.sh',
'bash-profile.sh',
-9
View File
@@ -1,9 +0,0 @@
source common.sh
testNormalization () {
clearStore
outPath=$(nix-build ./simple.nix --no-out-link)
test "$(stat -c %Y $outPath)" -eq 1
}
testNormalization
@@ -0,0 +1,11 @@
from pathlib import Path
from testlib.fixtures.file_helper import with_files
from testlib.fixtures.nix import Nix
from testlib.utils import get_global_asset_pack
@with_files({"drv": get_global_asset_pack("simple-drv")})
def test_output_normalization(nix: Nix):
result = nix.nix_build(["drv/simple.nix"]).run().ok().stdout_plain
assert Path(result).stat().st_mtime == 1