Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremie Dimino committed May 1, 2018
1 parent 0324e18 commit d6e8786
Show file tree
Hide file tree
Showing 48 changed files with 105 additions and 105 deletions.
16 changes: 8 additions & 8 deletions test/blackbox-tests/test-cases/aliases/run.t
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
$ jbuilder clean --display short
$ jbuilder build --display short @just-in-src
$ dune clean --display short
$ dune build --display short @just-in-src
running in src
$ jbuilder clean --display short
$ jbuilder build --display short @everywhere
$ dune clean --display short
$ dune build --display short @everywhere
running in src/foo/bar
running in src/foo/baz
running in src
$ jbuilder clean --display short
$ jbuilder build --display short @x
$ dune clean --display short
$ dune build --display short @x
running in src/foo/bar
running in src/foo/baz
running in src
$ jbuilder build --display short @plop
$ dune build --display short @plop
From the command line:
Error: Alias plop is empty.
It is not defined in . or any of its descendants.
[1]
$ jbuilder build --display short @truc/x
$ dune build --display short @truc/x
From the command line:
Error: Don't know about directory truc!
[1]
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/c-stubs/run.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ jbuilder exec ./qnativerun/run.exe --display short
$ dune exec ./qnativerun/run.exe --display short
ocamldep qnativerun/run.ml.d
ocamlc q/q_stub$ext_obj
ocamlmklib q/dllq_stubs$ext_dll,q/libq_stubs$ext_lib
Expand All @@ -11,4 +11,4 @@
ocamlopt qnativerun/.run.eobjs/run.{cmx,o}
ocamlopt qnativerun/run.exe
42
# $ jbuilder exec ./qbyterun/run.bc --display short
# $ dune exec ./qbyterun/run.bc --display short
6 changes: 3 additions & 3 deletions test/blackbox-tests/test-cases/configurator/run.t
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Show that config values are present
$ jbuilder exec config/run.exe
$ dune exec config/run.exe
DUNE_CONFIGURATOR is present
version is present

We're able to compile C program sucessfully
$ jbuilder exec c_test/run.exe
$ dune exec c_test/run.exe
Successfully compiled c program

Importing #define's from code is successful
$ jbuilder exec import-define/run.exe
$ dune exec import-define/run.exe
CAML_CONFIG_H=true
Page_log=12
CONFIGURATOR_TESTING=foobar
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/copy_files/run.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ jbuilder build test.exe .merlin --display short --debug-dependency-path
$ dune build test.exe .merlin --display short --debug-dependency-path
ocamllex lexers/lexer1.ml
ocamldep lexer1.ml.d
ocamldep test.ml.d
Expand All @@ -13,6 +13,6 @@
ocamlc .test.eobjs/test.{cmi,cmo,cmt}
ocamlopt .test.eobjs/test.{cmx,o}
ocamlopt test.exe
$ jbuilder build @bar-source --display short
$ dune build @bar-source --display short
#line 1 "include/bar.h"
int foo () {return 42;}
10 changes: 5 additions & 5 deletions test/blackbox-tests/test-cases/depend-on-the-universe/run.t
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
$ jbuilder build @x
$ dune build @x
Hello, world!
$ jbuilder build @x
$ dune build @x
Hello, world!
$ jbuilder build @x
$ dune build @x
Hello, world!
$ jbuilder build @x
$ dune build @x
Hello, world!
$ jbuilder build @x
$ dune build @x
Hello, world!
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$ jbuilder build --display short
$ dune build --display short
File "jbuild", line 3, characters 24-28:
Warning: Module Fake is excluded but it doesn't exist.
12 changes: 6 additions & 6 deletions test/blackbox-tests/test-cases/exec-cmd/run.t
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
$ jbuilder clean --display short
$ jbuilder exec --no-build ./foo.exe --display short
$ dune clean --display short
$ dune exec --no-build ./foo.exe --display short
Error: Program "./foo.exe" isn't built yet you need to buid it first or remove the --no-build option.
[1]
$ jbuilder exec ./foo.exe --display short
$ dune exec ./foo.exe --display short
ocamldep foo.ml.d
ocamlc .foo.eobjs/foo.{cmi,cmo,cmt}
ocamlopt .foo.eobjs/foo.{cmx,o}
ocamlopt foo.exe
Foo
$ jbuilder exec --dev ./foo.exe --display short
$ dune exec --dev ./foo.exe --display short
ocamlc .foo.eobjs/foo.{cmi,cmo,cmt}
ocamlopt .foo.eobjs/foo.{cmx,o}
ocamlopt foo.exe
Foo
$ jbuilder exec dunetestbar --no-build --display short
$ dune exec dunetestbar --no-build --display short
Error: Program "dunetestbar" isn't built yet you need to buid it first or remove the --no-build option.
[1]
$ jbuilder exec dunetestbar --display short
$ dune exec dunetestbar --display short
ocamldep bar.ml.d
ocamlc .bar.eobjs/bar.{cmi,cmo,cmt}
ocamlopt .bar.eobjs/bar.{cmx,o}
Expand Down
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/findlib/run.t
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
$ jbuilder external-lib-deps @install
$ dune external-lib-deps @install
These are the external library dependencies in the default context:
- a
- b
- c

Reproduction case for #484. The error should point to src/jbuild

$ jbuilder build @install
$ dune build @install
File "src/jbuild", line 4, characters 16-17:
Error: Library "a" not found.
Hint: try: dune external-lib-deps --missing @install
Expand Down
8 changes: 4 additions & 4 deletions test/blackbox-tests/test-cases/force-test/run.t
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
$ jbuilder clean --display short
$ jbuilder runtest --display short
$ dune clean --display short
$ dune runtest --display short
ocamldep f.ml.d
ocamlc .f.eobjs/f.{cmi,cmo,cmt}
ocamlopt .f.eobjs/f.{cmx,o}
ocamlopt f.exe
f alias runtest
Foo Bar
$ jbuilder runtest --display short
$ jbuilder runtest --force --display short
$ dune runtest --display short
$ dune runtest --force --display short
f alias runtest
Foo Bar
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/gen-opam-install-file/run.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ jbuilder runtest --display short
$ dune runtest --display short
ocamldep bar.ml.d
ocamldep foo.ml.d
ocamldep foo.mli.d
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/github20/run.t
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ jbuilder build .merlin --display short
$ dune build .merlin --display short
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/github24/run.t
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ jbuilder build @install --display short --debug-dependency-path
$ dune build @install --display short --debug-dependency-path
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/github25/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ problem. So jbuilder shouldn't crash because of "plop.ca-marche-pas"

We need ocamlfind to run this test

$ jbuilder build @install --display short --only hello
$ dune build @install --display short --only hello
ocamlc root/.hello.objs/hello.{cmi,cmo,cmt}
ocamlopt root/.hello.objs/hello.{cmx,o}
ocamlopt root/hello.{a,cmxa}
ocamlopt root/hello.cmxs
ocamlc root/hello.cma

$ jbuilder build @install --display short --only pas-de-bol 2>&1 | sed 's/[^ "]*findlib-packages/.../'
$ dune build @install --display short --only pas-de-bol 2>&1 | sed 's/[^ "]*findlib-packages/.../'
ocamldep root/a.ml.d
File ".../plop/META", line 1, characters 0-0:
Error: Library "une-lib-qui-nexiste-pas" not found.
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/github534/run.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ jbuilder exec ./main.exe --display short
$ dune exec ./main.exe --display short
echo main.ml
ocamldep main.ml.d
ocamlc .main.eobjs/main.{cmi,cmo,cmt}
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/github568/run.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ jbuilder runtest --display short -p lib1 --debug-dependency-path
$ dune runtest --display short -p lib1 --debug-dependency-path
ocamldep test1.ml.d
ocamldep lib1.ml.d
ocamlc .lib1.objs/lib1.{cmi,cmo,cmt}
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/github597/run.t
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ jbuilder build b/b.cma
$ dune build b/b.cma
6 changes: 3 additions & 3 deletions test/blackbox-tests/test-cases/github644/run.t
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
$ jbuilder runtest
$ dune runtest
File "jbuild", line 4, characters 20-42:
Error: Library "ppx_that_doesn't_exist" not found.
Hint: try: dune external-lib-deps --missing @runtest
[1]

These should print something:

$ jbuilder external-lib-deps --display quiet @runtest
$ dune external-lib-deps --display quiet @runtest
These are the external library dependencies in the default context:
- ocaml-migrate-parsetree.driver-main
- ppx_that_doesn't_exist

$ jbuilder external-lib-deps --display quiet --missing @runtest
$ dune external-lib-deps --display quiet --missing @runtest
Error: The following libraries are missing in the default context:
- ppx_that_doesn't_exist
Hint: try: opam install ppx_that_doesn't_exist
Expand Down
8 changes: 4 additions & 4 deletions test/blackbox-tests/test-cases/github660/run.t
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
When there are explicit interfaces, modules must be rebuilt.

$ jbuilder runtest --root explicit-interfaces --display quiet -j1 2>&1 | grep -v Entering
$ dune runtest --root explicit-interfaces --display quiet -j1 2>&1 | grep -v Entering
main alias runtest
hello
$ echo 'let x = 1' >> explicit-interfaces/lib_sub.ml
$ jbuilder runtest --root explicit-interfaces --display quiet -j1 2>&1 | grep -v Entering | grep -v ocamlopt
$ dune runtest --root explicit-interfaces --display quiet -j1 2>&1 | grep -v Entering | grep -v ocamlopt
main alias runtest
hello

When there are no interfaces, the situation is the same, but it is not possible
to rely on these.

$ jbuilder runtest --root no-interfaces --display quiet -j1 2>&1 | grep -v Entering
$ dune runtest --root no-interfaces --display quiet -j1 2>&1 | grep -v Entering
main alias runtest
hello
$ echo 'let x = 1' >> no-interfaces/lib_sub.ml
$ jbuilder runtest --root no-interfaces --display quiet -j1 2>&1 | grep -v Entering | grep -v ocamlopt
$ dune runtest --root no-interfaces --display quiet -j1 2>&1 | grep -v Entering | grep -v ocamlopt
main alias runtest
hello
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/github717-odoc-index/run.t
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ jbuilder build @doc
$ dune build @doc
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/include-loop/run.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ jbuilder build --display short
$ dune build --display short
File "jbuild", line 2, characters 0-15:
Error: Recursive inclusion of jbuild files detected:
File a.inc is included from c.inc:2
Expand Down
8 changes: 4 additions & 4 deletions test/blackbox-tests/test-cases/inline_tests/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
Fatal error: exception File "simple/.foo_simple.inline-tests/run.ml", line 1, characters 10-16: Assertion failed
[1]

$ jbuilder runtest missing-backend
$ dune runtest missing-backend
File "missing-backend/jbuild", line 3, characters 2-16:
Error: No inline tests backend found.
[1]

$ jbuilder runtest too-many-backends
$ dune runtest too-many-backends
File "too-many-backends/jbuild", line 17, characters 2-16:
Error: Too many independant inline tests backends found:
- "backend_tmb1" in _build/default/too-many-backends
- "backend_tmb2" in _build/default/too-many-backends
[1]

$ jbuilder runtest many-backends-choose
$ dune runtest many-backends-choose
run alias many-backends-choose/runtest
backend_mbc1

$ jbuilder runtest dune-file
$ dune runtest dune-file
(dune
1
((inline_tests.backend
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ jbuilder build @install --display short
$ dune build @install --display short
ocamldep a1/a.ml.d
ocamlc a1/.a.objs/a.{cmi,cmo,cmt}
ocamlopt a1/.a.objs/a.{cmx,o}
Expand Down
10 changes: 5 additions & 5 deletions test/blackbox-tests/test-cases/intf-only/run.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Successes:

$ jbuilder build --display short --root foo --debug-dep 2>&1 | grep -v Entering
$ dune build --display short --root foo --debug-dep 2>&1 | grep -v Entering
ocamldep test/bar.ml.d
ocamldep foo.ml.d
ocamlc .foo.objs/foo__.{cmi,cmo,cmt}
Expand All @@ -20,7 +20,7 @@ Successes:

Errors:

$ jbuilder build --display short --root a foo.cma 2>&1 | grep -v Entering
$ dune build --display short --root a foo.cma 2>&1 | grep -v Entering
File "jbuild", line 2, characters 1-13:
Warning: Some modules don't have an implementation.
You need to add the following field to this stanza:
Expand All @@ -30,16 +30,16 @@ Errors:
This will become an error in the future.
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
ocamlc foo.cma
$ jbuilder build --display short --root b foo.cma 2>&1 | grep -v Entering
$ dune build --display short --root b foo.cma 2>&1 | grep -v Entering
File "jbuild", line 3, characters 34-37:
Warning: The following modules must be listed here as they don't have an implementation:
- y
This will become an error in the future.
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
ocamlc foo.cma
$ jbuilder build --display short --root c foo.cma 2>&1 | grep -v Entering
$ dune build --display short --root c foo.cma 2>&1 | grep -v Entering
File "jbuild", line 3, characters 35-36:
Error: Module X doesn't exist.
$ jbuilder build --display short --root d foo.cma 2>&1 | grep -v Entering
$ dune build --display short --root d foo.cma 2>&1 | grep -v Entering
File "jbuild", line 3, characters 35-36:
Error: Module X has an implementation, it cannot be listed here
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/js_of_ocaml/run.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ jbuilder build --display short --dev bin/technologic.bc.js @install lib/x.cma.js lib/x__Y.cmo.js bin/z.cmo.js
$ dune build --display short --dev bin/technologic.bc.js @install lib/x.cma.js lib/x__Y.cmo.js bin/z.cmo.js
ocamlc lib/stubs$ext_obj
ocamlmklib lib/dllx_stubs$ext_dll,lib/libx_stubs$ext_lib
ocamlopt .ppx/js_of_ocaml-ppx/ppx.exe
Expand Down Expand Up @@ -34,7 +34,7 @@
use it
break it
fix it
$ jbuilder build --display short bin/technologic.bc.js @install
$ dune build --display short bin/technologic.bc.js @install
ocamlc lib/.x.objs/x__.{cmi,cmo,cmt}
ocamlc lib/.x.objs/x__Y.{cmi,cmo,cmt}
ocamlc lib/.x.objs/x.{cmi,cmo,cmt}
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/lib-available/run.t
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$ jbuilder build @runtest --display short --debug-dependency-path 2>&1 | sed "s/ cmd / sh /"
$ dune build @runtest --display short --debug-dependency-path 2>&1 | sed "s/ cmd / sh /"
sh alias runtest
sh alias runtest
6 changes: 3 additions & 3 deletions test/blackbox-tests/test-cases/loop/run.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ jbuilder build --display short a
$ dune build --display short a
true x
true y
Dependency cycle between the following files:
Expand All @@ -11,14 +11,14 @@ This second example is slightly more complicated as we request result1
but the cycle doesn't involve result1. We must make sure the output
does show a cycle.

$ jbuilder build --display short result1
$ dune build --display short result1
Dependency cycle between the following files:
_build/default/result2
--> _build/default/input
--> _build/default/result2
[1]

$ jbuilder build --display short result1 --debug-dependency-path
$ dune build --display short result1 --debug-dependency-path
Dependency cycle between the following files:
_build/default/result2
--> _build/default/input
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/menhir/run.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ jbuilder build src/test.exe --display short --debug-dependency-path
$ dune build src/test.exe --display short --debug-dependency-path
ocamllex src/lexer1.ml
ocamldep src/lexer1.ml.d
ocamllex src/lexer2.ml
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/merlin-tests/run.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ jbuilder build @print-merlins --display short
$ dune build @print-merlins --display short
ocamldep sanitize-dot-merlin/sanitize_dot_merlin.ml.d
ocamlc sanitize-dot-merlin/.sanitize_dot_merlin.eobjs/sanitize_dot_merlin.{cmi,cmo,cmt}
ocamlopt sanitize-dot-merlin/.sanitize_dot_merlin.eobjs/sanitize_dot_merlin.{cmx,o}
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/meta-gen/run.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ jbuilder runtest --force --display short
$ dune runtest --force --display short
description = "contains \"quotes\""
requires = "bytes"
archive(byte) = "foobar.cma"
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/misc/run.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ jbuilder runtest --display short
$ dune runtest --display short
File "jbuild", line 65, characters 21-44:
Warning: Directory dir-that-doesnt-exist doesn't exist.
diff alias runtest
Expand Down
Loading

0 comments on commit d6e8786

Please sign in to comment.