Commit Graph

303 Commits (9e181ca8f446d238ba279bc22fef9d166d4f38b0)

Author SHA1 Message Date
Nicolás Ojeda Bär 540996d21e Remove Spacetime 2020-10-08 20:28:12 +02:00
Brett Gilio 9038c98fc7
Modify ocamltest_core_and_plugin dune. (#9843)
Co-authored-by: David Allsopp <david.allsopp@metastack.com>
2020-09-22 10:27:32 +02:00
David Allsopp 6a4f9aef5f Report a diff for files differing by endings only 2020-07-25 10:36:24 +01:00
David Allsopp a651a82488 Fix handling of EOL-at-EOF in ocamltest 2020-07-25 10:04:31 +01:00
David Allsopp 781b37b688
Actually remove directories (#9849)
`rm_rf` removed the files (recursively) but not the directories.
2020-08-20 16:06:46 +02:00
David Allsopp b9a4de7b2d Eliminate typo 2020-07-23 15:06:52 +01:00
David Allsopp 8b80c57fb2 Remove use of ln -sf from ocamltest
Implemented ln -sfT exactly on Unix and almost exactly on Windows.
2020-07-23 15:05:00 +01:00
David Allsopp fc0abfaad8 Remove use of rm -rf from ocamltest 2020-07-23 15:04:49 +01:00
David Allsopp 9bc33d945a Add Ocamltest_stdlib.Unix.has_symlink
Replaces the duplicated C stub. Functions from Unix must be explictly
imported.
2020-07-23 14:55:36 +01:00
David Allsopp 496cc8b3a1 Remove incorrect stub in ocamltest_stdlib_stubs.c
Miscopied from win32unix.
2020-07-21 14:33:08 +01:00
David Allsopp 99f56de82d Use Sys.mkdir in ocamltest instead of shell call 2020-07-21 14:27:52 +01:00
Sébastien Hinderer f3ff1337a1 Build system: honour the CFLAGS and CPPFLAGS build variables
With this commit, it becomes possible to provide C compiler and preprocessor
flags to use in addition to those defined by the build system.

As required by the GNU coding standards, the flags can be provided
either at configure or at make invocation.

The provided CFLAGS and CPPFLAGS will also be taken into account
when C code is compiled by ocamlc/ocamlopt.

This commit removes the explicit reference to CFLAGS in the
configuration for the xlc compiler, since it is not necessary any longer.
2020-08-06 14:30:50 +02:00
David Allsopp 2317acc0c0 Return tests in alphabetical order 2020-07-27 16:28:27 +01:00
David Allsopp 2bba32a1fb
Merge pull request #9808 from dra27/ocamltest-toplevel
Fix running win-unicode test
2020-07-29 11:29:47 +01:00
David Allsopp df705bce12 Fix running toplevel tests in ocamltest
Fault in the logic for toplevel tests meant the win-unicode tests were
never running.
2020-07-28 10:57:44 +01:00
Stephen Dolan e678885007 Lock channels before doing I/O
The debugger's use of channels doesn't support locking, but it
doesn't work on threaded programs anyway.
2020-07-27 17:29:39 +01:00
Nicolás Ojeda Bär 4f31b10d66
ocamltest: fix include native dynlink (#9791)
Add "-I otherlibs/dynlink/native" when doing "include dynlink".
2020-07-23 09:47:03 +02:00
Antonin Décimo c944d64234 Fix memory leak
Some [Linux manpages][1] state

> This function makes copies of the strings pointed to by name and
> value (by contrast with putenv(3)).

and the [OpenGroup][2] manpage also states that the strings are
copied, so indeed they can and should be freed afterwards.

[1]: https://man7.org/linux/man-pages/man3/setenv.3.html
[2]: https://pubs.opengroup.org/onlinepubs/009695399/functions/setenv.html
2020-07-17 19:49:27 +02:00
Nicolás Ojeda Bär 7f0dbd4e65
ocamltest: show failing logs (#9696) 2020-06-23 20:47:38 +02:00
Nicolás Ojeda Bär bd510cdf93
ocamltest: do not compare binaries produced by ocamlopt.opt and ocamlopt.byte (#9677) 2020-06-23 17:36:37 +02:00
Xavier Leroy 133102cfc7 ocamltest: add the "naked_pointers" action
It succeeds if the runtime system supports naked pointers,
and fails otherwise (e.g. if configured with --disable-naked-pointers).
2020-06-22 19:37:15 +02:00
Sébastien Hinderer bdd9ca391e Add the $(EXE) suffix to all programs at build rather than install time
This commit touches neither boot/ocamlc nor boot/ocamllex

It has the side-effect of fixing the cleanup rules which did not use the
$(EXE) extension when removing a file although it was produced with the
$(EXE) extension.
2020-06-18 11:16:55 +02:00
Sébastien Hinderer a50d177c2a ocamltest: improve the way executable file extension is determined
Use the EXE build variable rather than OS type to determine the
extension of executable files
2020-06-18 11:07:43 +02:00
Sébastien Hinderer d8f3273292
Merge pull request #9285 from dra27/simplify-mkexe
Eliminate MKEXE_ANSI from build system
2020-06-08 17:13:05 +02:00
Nicolás Ojeda Bär a8cd077083 check-typo 2020-06-08 11:17:22 +02:00
David Allsopp d192a2c284 Eliminate MKEXE_ANSI from build system 2020-06-06 13:36:15 +01:00
David Allsopp da943eac54 Share generation code between ocamltest and utils
ocamltest/ocamltest_config.ml now generated using same make macros as
utils/config.ml.
2020-06-06 13:36:00 +01:00
Nicolás Ojeda Bär 6ff2c11b25 ocamltest: do not overwrite user-defined variables 2020-06-05 07:40:17 +02:00
Manuel Hornung 2b6f49e874
Add new flag for non-elevated symbolic links and test for Developer Mode on Windows (#9593)
Support symbolic links in developer mode on Windows 10
2020-05-29 07:39:59 +01:00
Nicolás Ojeda Bär b4ba61d73d Typos 2020-05-27 19:19:22 +02:00
Nicolás Ojeda Bär 105ac40bd6 Hide references in Options implementation 2020-05-27 19:19:22 +02:00
Nicolás Ojeda Bär 13e96a1bcf Remove unneeded Sys.chdir 2020-05-27 19:19:22 +02:00
Nicolás Ojeda Bär 73aa6126a7 Use with_{input,output}_file 2020-05-27 19:19:22 +02:00
Nicolás Ojeda Bär b77b13d812 Use Sys.{win32,...} instead Sys.os_type 2020-05-27 19:19:22 +02:00
Nicolás Ojeda Bär 3eebf1ab8c Use Filename.quote_command 2020-05-27 19:19:22 +02:00
Nicolás Ojeda Bär 6c311f3007 stop passing the constant ocamlsrcdir to each function 2020-05-27 19:19:22 +02:00
Nicolás Ojeda Bär 9b748843bb
Use List.find_map (#9589) 2020-05-21 08:51:16 +02:00
Gabriel Scherer 17dcf49610 please check-typo despite all the sand 2020-05-18 15:15:04 +02:00
Gabriel Scherer 20e1d6e478 fix 'dune build @libs' after #9257 2020-05-06 21:37:08 +02:00
Gabriel Scherer 11c9d92732 ocamltest/Makefile: do not depend on UNIX_OR_WIN32 for 'clean'
Change suggested by David Allsopp.
2020-05-06 12:10:02 +02:00
Gabriel Scherer fab58a938a makefiles: move the inclusion of Makefile.build_config in Makefile.common 2020-05-06 12:10:02 +02:00
Gabriel Scherer 9eb9d04751 fix the dune build 2020-05-03 10:11:47 +02:00
David Allsopp ac2a9dd188 Cease committing C dependendency information
When building for the first time, the only requirement is that generated
header files have been built (jumptbl.h, version.h and opnames.h).
Detailed dependency information is only required when headers have been
edited.

COMPUTE_DEPS in Makefile.config controls whether C dependency
information should be generated on a per-file basis. This variable is
controlled by a new --disable-dependency-generation in configure which
is enabled for Git checkouts and disabled for tarballs (i.e. releases).

The Microsoft C compiler (cl) cannot generate dependencies in a
consistent way which we can consume, so for a Git checkout configure
searches for an additional C compiler in order to compute dependencies.
This is obviously not required for a user-build.

As a result, the MSVC port can now safely run make alldepend, since only
OCaml dependency information is committed to the repo after this change.

CI does not need to waste time testing the dependency information,
because it only tests a single build. A single Travis job has been added
which tests the build system code to generate the dependency information
(and provides a single `make -j` run in CI, although Inria's CI also
tests parallel building continuously).
2020-04-17 14:11:22 +01:00
David Allsopp 3a40b2fd94 Introduce Makefile.build_config.in
This moves the configure-generated parts of Makefile.common to a
separate (generated) Makefile, allowing Makefile.common to be a normal
Makefile.

OCaml's build system Makefile's now include Makefile.build_config (which
itself includes Makefile.config) but Makefile.config is still installed
as before. This allows configure to generate variables which are
specific to the build process and are not intended to be exported to the
installation.
2020-04-17 13:53:49 +01:00
Enguerrand Decorne b7f0494df5 Rewrite the instrumented runtime to store traces in the CTF format.
The instrumentation code in the instrumented runtime was replaced
with new APIs to gather runtime statistics and output them in a new format
(Common Trace Format).
This commit also exposes new functions in the Gc module to pause or resume
instrumentation during a program execution (Gc.eventlog_pause and
Gc.eventlog_resume).
2020-04-30 10:32:01 +02:00
Damien Doligez e92d13c986 last commit before branching 4.11 2020-04-22 17:28:08 +02:00
David Allsopp 1128e85962
Merge pull request #9480 from xavierleroy/print-pid_t
Cast `getpid()` to `long long` before printing
2020-04-21 11:13:02 +01:00
Nicolás Ojeda Bär 15b08d2fdf
Use Filename.quote_command (#9476) 2020-04-20 14:38:10 +02:00
Xavier Leroy 974b9ca1a2 Cast `getpid()` to `long long` before printing
Follow-up to commit 41441a65f.
That commit fixed the issue in runtime/ .
The present commit fixes the issue in ocamltest/ .
2020-04-20 12:00:03 +02:00
David Allsopp 13786d7d12 Ensure make distclean works on an unconfigured tree 2019-10-15 11:46:36 +01:00