Reimplement the test discovery of the lang tests script in Nix which allows for a more flexible skipping logic that can e.g. react to the C++ Nix version used. This allows us to run the test suite against both C++ Nix 2.3 and the latest C++ Nix version 2.11. The latter is mainly useful, so we can implement newer Nix features and still verify them against the C++ implementation. Change-Id: I30c802844133b86b5e49f5e4f4fefacdb6215e0e Reviewed-on: https://cl.tvl.fyi/c/depot/+/7042 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
		
			
				
	
	
		
			30 lines
		
	
	
	
		
			848 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
	
		
			848 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ depot, pkgs, lib, ... }:
 | 
						|
 | 
						|
lib.fix (self: depot.third_party.naersk.buildPackage (lib.fix (naerskArgs: {
 | 
						|
  src = depot.third_party.gitignoreSource ./.;
 | 
						|
  # see https://github.com/nix-community/naersk/issues/169
 | 
						|
  root = depot.nix.sparseTree ./. [ ./Cargo.lock ./Cargo.toml ];
 | 
						|
 | 
						|
  doCheck = true;
 | 
						|
 | 
						|
  # Tell the test suite where to find upstream nix, to compare eval results
 | 
						|
  # against
 | 
						|
  NIX_INSTANTIATE_BINARY_PATH = "${pkgs.nix}/bin/nix-instantiate";
 | 
						|
 | 
						|
  meta.ci.targets = builtins.attrNames self.passthru;
 | 
						|
 | 
						|
  passthru.benchmarks = depot.third_party.naersk.buildPackage (naerskArgs // {
 | 
						|
    name = "tvix-eval-benchmarks";
 | 
						|
 | 
						|
    doCheck = false;
 | 
						|
 | 
						|
    cargoBuildOptions = opts: opts ++ [ "--benches" ];
 | 
						|
 | 
						|
    copyBinsFilter = ''
 | 
						|
      select(.reason == "compiler-artifact" and any(.target.kind[] == "bench"; .))
 | 
						|
    '';
 | 
						|
 | 
						|
    passthru = { };
 | 
						|
  });
 | 
						|
}))
 | 
						|
)
 |