; Regenerate using dune build @gendune --auto-promote

(include dune.inc)

(rule
 (alias gendune)
 (deps
  (source_tree .))
 (target dune.inc.gen)
 (action
  (with-stdout-to
   dune.inc.gen
   (run ./gen_dune.exe))))

(rule
 (alias gendune)
 (action
  (diff dune.inc dune.inc.gen)))

(executable
 (name gen_dune)
 (libraries liquidsoap_build_tools)
 (modules gen_dune))

(rule
 (alias citest)
 (package liquidsoap)
 (deps
  ../../src/bin/liquidsoap.exe
  (package liquidsoap)
  (:stdlib ../../src/libs/stdlib.liq)
  (:run_test ../run_test.exe))
 (action
  (run
   %{run_test}
   "server port"
   liquidsoap
   --check
   "harbor.http.register.simple(port=2000,method=\"GET\",\"/foo\",(fun (_) -> \"test\"))")))
