testing: migrate output-normalization.sh
Change-Id: I51a021b27fa27b531bb49b8529bae2e9bf74641a
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user