about summary refs log tree commit diff
path: root/tvix/eval/tests (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
4 hours r/8542 chore(aspen/system): Turn off disableWhileTyping for libinputAspen Smith1-6/+1
I... actually really hate this, it turns out. Plus it breaks video games, lol. Change-Id: I4b86e38ee78f5f3b6ffec5e7cc4f1dc054d91c56 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12256 Reviewed-by: aspen <root@gws.fyi> Autosubmit: aspen <root@gws.fyi> Tested-by: BuildkiteCI
7 hours r/8541 feat(tvix/nix-compat): entry locator in listing structuresRyan Lahfa2-1/+113
This implements a simple DFS locator in listing structures. It is interoperable with the Rust standard library paths, we also build our own errors to restrict path values to reasonable secure defaults, e.g. relative paths with no `..` component. Tests are added for this new feature for a positive and a negative check. In addition, a path validation test was added. The Windows-style prefix is gated on the Windows platform as UNIX does not parse `C:\\` as a `Component::Prefix(_)` but as a `Component::Normal(_)`. Change-Id: Iae2a80bebd8138e41af94aa7d09f2842c3c5a786 Signed-off-by: Ryan Lahfa <tvl@lahfa.xyz> Reviewed-on: https://cl.tvl.fyi/c/depot/+/12255 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
10 hours r/8540 feat(nix-compat/narinfo/signature): generalize name fieldFlorian Klink9-45/+117
Requiring `name` to be a `&str` means it'll get annoying to pass around `Signature`, but being able to pass them around in an owned fashion is kinda a requirement for a stronger typed `PathInfo` struct, where we want to have full ownership. Rework the `Signature` struct to become generic over the type of the `name` field. This means, it becomes possible to have owned versions of it. We don't want to impose `String` or `SmolStr` for example, but want to leave it up to the nix-compat user to decide. Provide a type alias for the existing `&str` variant (`SignatureRef`), and use it where we previously used the non-generic `Signature` one. Add some tests to ensure it's possible to *use* `Signature` with both `String` and `SmolStr` (but only pull in `smol_str` as dev dependency for the tests). Also, add some more docstrings, these were a bit sparse. Change-Id: I3f75691498c6bda9cd072d2d9dac83c4f6c57287 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12253 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
11 hours r/8539 feat(tvix/nix-compat): add a basic listing deserializerRyan Lahfa4-0/+77
.ls files are useful to seek in a NAR without parsing it entirely. The responsibility of validating the files is on the caller. Change-Id: I5d1da28b5479c38f20ca5babe60e362a2217c9ea Signed-off-by: Ryan Lahfa <tvl@lahfa.xyz> Reviewed-on: https://cl.tvl.fyi/c/depot/+/12196 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
13 hours r/8538 feat(tvix): drop usage of sparseTree in favor of lib.sourceByRegexIlan Joselevich6-41/+25
We can avoid depending on things outside //tvix by just using a similar util from nixpkgs. Change-Id: I9ea3e1f0a8a059ea10caaec173569ba9f316aec6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12247 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
13 hours r/8537 feat(tvix/boot/tests): use pkgs.nixos instead of nixosForIlan Joselevich1-4/+5
Using pkgs.nixos directly allows us to create a smaller nixos closure for the tests and also not depend on things in depot.ops which can be beneficial for extending the tvix josh workspace. Change-Id: Ic6ad2122733418114b43aa692d6e42ac1e308eeb Reviewed-on: https://cl.tvl.fyi/c/depot/+/12251 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
15 hours r/8536 refactor(nix-compat/narinfo/signature): use ed25519::SignatureBytesFlorian Klink1-4/+5
It's a `[u8; SIGNATURE_LENGTH]` type alias, and conveys what we're accepting or returning a bit nicer. Change-Id: I974cd97d56d383e51417eb0f26e1431a05711922 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12252 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz>
17 hours r/8535 feat(tazjin/german-string): add constructor method from owned dataVincent Ambo1-12/+40
Makes it possible to construct a GermanString from an owned byte vector, without having to clone the data. This is done by "disowning" the vector using ManuallyDrop to access its internal pointer. For transient strings, this memory is then owned (and freed) by the GermanString instance. Small strings are copied out of the heap and stored inline as before, to avoid any dereferencing operations. Change-Id: I754736099f71d646d430aed73e558a5a7626c394 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12249 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
17 hours r/8534