summaryrefslogtreecommitdiffstats
path: root/pkgs/development/rocq-modules/wasmcert/test.nix
blob: ba548f794cddee938cd53ec56f0840730d7f61df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
  stdenv,
  coq,
  wasmcert,
}:

stdenv.mkDerivation {
  pname = "wasmcert-interpreter-test";
  inherit (wasmcert) src version;
  nativeCheckInputs = [
    wasmcert
    coq
  ];
  dontConfigure = true;
  dontBuild = true;
  doCheck = true;

  checkPhase = ''
    coqc .ci/import_test.v

    wasm_coq_interpreter tests/add.wasm -r main

    if [ $? -ne 0 ]; then
      echo "Wasm_coq_interpreter failed to run hello world program"
      exit 1
    fi
  '';

  installPhase = "touch $out";
}