Skip to content

Commit

Permalink
http-lib: convert bash script to cram tests
Browse files Browse the repository at this point in the history
Gives more flexibility in tests. Now the results from the client aren't
printed, but weren't important to pass the test anyway.

Signed-off-by: Pau Ruiz Safont <[email protected]>
  • Loading branch information
psafont committed Oct 9, 2024
1 parent 008a813 commit ed96146
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
11 changes: 0 additions & 11 deletions ocaml/libs/http-lib/client_server_test.sh

This file was deleted.

6 changes: 1 addition & 5 deletions ocaml/libs/http-lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,10 @@
)
)

(rule
(alias runtest)
(cram
(package xapi)
(deps
test_client.exe
test_server.exe
client_server_test.sh
)
(action (run bash client_server_test.sh))
)

7 changes: 7 additions & 0 deletions ocaml/libs/http-lib/test_client_server.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
== Bring server up
$ trap 'kill $(jobs -p)' EXIT
$ ./test_server.exe &
$ sleep 1

== Normal
$ ./test_client.exe > /dev/null

0 comments on commit ed96146

Please sign in to comment.