about summary refs log tree commit diff
path: root/tvix/eval/src/tests/nix_tests/notyetpassing
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-01-23T14·19+0200
committerclbot <clbot@tvl.fyi>2024-01-25T11·37+0000
commit850e50cd3f9ce83e4e2d73e48a84f496c27b31b3 (patch)
tree37f29403131877787415aa6ef6a72f5f774fa981 /tvix/eval/src/tests/nix_tests/notyetpassing
parent023e372583b7bcc71b5c301c49501cc72204068f (diff)
feat(tvix/eval/tests): compare .xml outputs r/7449
In case a .exp.xml file is provided alongside the test, compare its
output with the desired state.

Also, add some function .exp.xml that were presumably moved out of the
way back to src/tests/nix_tests, as they now produce the correct XML
output.

Change-Id: Ibd8123f3e6ed7bae3a44407d2284a2b2c8ce9a28
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10687
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/tests/nix_tests/notyetpassing')
-rw-r--r--tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-closure.exp.xml343
-rw-r--r--tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.exp.xml15
-rw-r--r--tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.nix80
3 files changed, 0 insertions, 438 deletions
diff --git a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-closure.exp.xml b/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-closure.exp.xml
deleted file mode 100644
index dffc03a99891..000000000000
--- a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-closure.exp.xml
+++ /dev/null
@@ -1,343 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<expr>
-  <list>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="-13" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="-12" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="-11" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="-9" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="-8" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="-7" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="-5" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="-4" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="-3" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="key">
-        <int value="-1" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="0" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="1" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="2" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="4" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="5" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="6" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="key">
-        <int value="8" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="9" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="10" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="13" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="14" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="15" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="key">
-        <int value="17" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="18" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="19" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="22" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="23" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="key">
-        <int value="26" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="27" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="28" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="31" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="32" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="key">
-        <int value="35" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="36" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="40" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="41" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="key">
-        <int value="44" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="45" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="49" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="key">
-        <int value="53" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="54" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="58" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="key">
-        <int value="62" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="foo">
-        <bool value="true" />
-      </attr>
-      <attr name="key">
-        <int value="67" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="key">
-        <int value="71" />
-      </attr>
-    </attrs>
-    <attrs>
-      <attr name="key">
-        <int value="80" />
-      </attr>
-    </attrs>
-  </list>
-</expr>
diff --git a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.exp.xml b/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.exp.xml
deleted file mode 100644
index 651f54c36341..000000000000
--- a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.exp.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<expr>
-  <list>
-    <string value="stdenv" />
-    <string value="fetchurl" />
-    <string value="aterm-stdenv" />
-    <string value="aterm-stdenv2" />
-    <string value="libX11" />
-    <string value="libXv" />
-    <string value="mplayer-stdenv2.libXv-libX11" />
-    <string value="mplayer-stdenv2.libXv-libX11_2" />
-    <string value="nix-stdenv-aterm-stdenv" />
-    <string value="nix-stdenv2-aterm2-stdenv2" />
-  </list>
-</expr>
diff --git a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.nix b/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.nix
deleted file mode 100644
index 68dca62ee18d..000000000000
--- a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.nix
+++ /dev/null
@@ -1,80 +0,0 @@
-let
-
-  stdenvFun = { }: { name = "stdenv"; };
-  stdenv2Fun = { }: { name = "stdenv2"; };
-  fetchurlFun = { stdenv }: assert stdenv.name == "stdenv"; { name = "fetchurl"; };
-  atermFun = { stdenv, fetchurl }: { name = "aterm-${stdenv.name}"; };
-  aterm2Fun = { stdenv, fetchurl }: { name = "aterm2-${stdenv.name}"; };
-  nixFun = { stdenv, fetchurl, aterm }: { name = "nix-${stdenv.name}-${aterm.name}"; };
-  
-  mplayerFun =
-    { stdenv, fetchurl, enableX11 ? false, xorg ? null, enableFoo ? true, foo ? null  }:
-    assert stdenv.name == "stdenv2";
-    assert enableX11 -> xorg.libXv.name == "libXv";
-    assert enableFoo -> foo != null;
-    { name = "mplayer-${stdenv.name}.${xorg.libXv.name}-${xorg.libX11.name}"; };
-
-  makeOverridable = f: origArgs: f origArgs //
-    { override = newArgs:
-        makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs));
-    };
-    
-  callPackage_ = pkgs: f: args:
-    makeOverridable f ((builtins.intersectAttrs (builtins.functionArgs f) pkgs) // args);
-
-  allPackages =
-    { overrides ? (pkgs: pkgsPrev: { }) }:
-    let
-      callPackage = callPackage_ pkgs;
-      pkgs = pkgsStd // (overrides pkgs pkgsStd);
-      pkgsStd = {
-        inherit pkgs;
-        stdenv = callPackage stdenvFun { };
-        stdenv2 = callPackage stdenv2Fun { };
-        fetchurl = callPackage fetchurlFun { };
-        aterm = callPackage atermFun { };
-        xorg = callPackage xorgFun { };
-        mplayer = callPackage mplayerFun { stdenv = pkgs.stdenv2; enableFoo = false; };
-        nix = callPackage nixFun { };
-      };
-    in pkgs;
-
-  libX11Fun = { stdenv, fetchurl }: { name = "libX11"; };
-  libX11_2Fun = { stdenv, fetchurl }: { name = "libX11_2"; };
-  libXvFun = { stdenv, fetchurl, libX11 }: { name = "libXv"; };
-  
-  xorgFun =
-    { pkgs }:
-    let callPackage = callPackage_ (pkgs // pkgs.xorg); in
-    {
-      libX11 = callPackage libX11Fun { };
-      libXv = callPackage libXvFun { };
-    };
-
-in
-
-let
-
-  pkgs = allPackages { };
-  
-  pkgs2 = allPackages {
-    overrides = pkgs: pkgsPrev: {
-      stdenv = pkgs.stdenv2;
-      nix = pkgsPrev.nix.override { aterm = aterm2Fun { inherit (pkgs) stdenv fetchurl; }; };
-      xorg = pkgsPrev.xorg // { libX11 = libX11_2Fun { inherit (pkgs) stdenv fetchurl; }; };
-    };
-  };
-  
-in
-
-  [ pkgs.stdenv.name
-    pkgs.fetchurl.name
-    pkgs.aterm.name
-    pkgs2.aterm.name
-    pkgs.xorg.libX11.name
-    pkgs.xorg.libXv.name
-    pkgs.mplayer.name
-    pkgs2.mplayer.name
-    pkgs.nix.name
-    pkgs2.nix.name
-  ]