at 21.11-pre 679 B view raw
1import ./make-test-python.nix ({ pkgs, ... }: 2 3let 4 riscvPkgs = import ../.. { crossSystem = pkgs.lib.systems.examples.riscv64-embedded; }; 5in 6{ 7 name = "spike"; 8 meta = with pkgs.lib.maintainers; { maintainers = [ blitz ]; }; 9 10 machine = { pkgs, lib, ... }: { 11 environment.systemPackages = [ pkgs.spike riscvPkgs.riscv-pk riscvPkgs.hello ]; 12 }; 13 14 # Run the RISC-V hello applications using the proxy kernel on the 15 # Spike emulator and see whether we get the expected output. 16 testScript = 17 '' 18 machine.wait_for_unit("multi-user.target") 19 output = machine.succeed("spike -m64 $(which pk) $(which hello)") 20 assert "Hello, world!" in output 21 ''; 22})