Commit graph

1006 commits

Author SHA1 Message Date
Vladimir Panteleev
a29876673a
rdmd_test: Don't attempt to run Makefile test when Make is too old
Allows running most of the rdmd test suite even on systems with old
GNU Make, such as Travis CI.
2018-04-10 21:28:01 +00:00
The Dlang Bot
9dc0d2e396
Merge pull request #346 from CyberShadow/rdmd-windows-fixes
rdmd and testsuite Windows fixes
merged-on-behalf-of: David Nadlinger <code@klickverbot.at>
2018-04-10 20:40:55 +02:00
Vladimir Panteleev
980a3eec38
rdmd_test: Replace use of assert with enforce
Avoid any potential false positives resulting from rdmd_test being
accidentally built with -release.

Avoiding this situation is paramount, with the alternative being a
clunky runtime test to detect that rdmd_test was built with -release,
so this solution is preferable, even considering the semantic loss of
the distinction between assert/enforce and their existing usage.
2018-04-10 17:01:08 +00:00
Vladimir Panteleev
90a686e1ea
appveyor.yml: Override DFLAGS
Avoid using the default -O -release build flags when running the test
suite, and enable debug info generation instead, to ensure asserts are
enabled and meaningful stack traces are produced on failure.
2018-04-10 16:45:44 +00:00
Vladimir Panteleev
20b96adfad
rdmd_test: Properly escape localDMD path in test
Windows uses backslashes for string separators, which are rendered as
escaped in rdmd's --chatty output. Mirror this behavior to correctly
run this test on Windows, as well as other situations when the path
contains characters that would be escaped by std.format's "DSON"
formatting.
2018-04-10 16:42:59 +00:00
Vladimir Panteleev
0b9872ce2d
rdmd_test: Use empty file for the dummy DMD program
Use an empty file (instead of one containing a dummy string) to avoid
a GUI pop-up, which would otherwise need to be dismissed by an
interactive user. An empty file will just cause a "%s is not a valid
Win32 application" exception, which is similar enough to the Posix
behavior and handled properly by rdmd and the test suite.
2018-04-10 16:41:12 +00:00
Vladimir Panteleev
5509f96e59
rdmd_test: Apply extension to localDMD in runFallbackTest
Mirror the rdmd fix from the previous commit and apply the proper
executable file extension on Windows.
2018-04-10 16:40:02 +00:00
Vladimir Panteleev
2e516ab51a
rdmd: Append binExt to the compiler path to check from the same directory
Fixes using the compiler from rdmd's directory (issue 11997) on
Windows.
2018-04-10 16:17:47 +00:00
Vladimir Panteleev
8997c5765c
rdmd_test: Don't attempt to run Makefile test on Windows
Almost certainly, the `make` executable in PATH is not going to be GNU
Make, but DigitalMars Make instead.
2018-04-10 16:17:11 +00:00
Vladimir Panteleev
f9a7408119
rdmd_test: Include model switches where they were previously omitted
Fixes some tests using the wrong model.

Also fixes running the test suite for DMD configurations supporting
just one model, which is not the default DMD model (e.g. those built
by Digger on Windows).
2018-04-10 16:15:52 +00:00
Vladimir Panteleev
cdba7d3deb
rdmd_test: Fix help text test on Windows
Convert line endings before attempting to split by them.
2018-04-10 16:15:16 +00:00
The Dlang Bot
b071a85ce7
Merge pull request #342 from wilzbach/fix-nightlies
posix.mak: use -f to fix nightlies
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2018-03-28 00:40:40 +02:00
Sebastian Wilzbach
61cf8b8059 posix.mak: use -f to fix nightlies 2018-03-27 23:16:20 +02:00
The Dlang Bot
64b888f3a2
Merge pull request #330 from wilzbach/sanitycheck-changelog
Add a sanitycheck to ensure that changelog files end with .dd
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2018-03-26 04:10:06 +02:00
The Dlang Bot
9064366cc8
Merge pull request #336 from Superstar64/makefile_compat_rdmd
rdmd: support --eval <arg> to make it Makefile friendly
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2018-03-26 04:06:52 +02:00
Sebastian Wilzbach
10bfea0142 Add a sanitycheck to ensure that changelog files end with .dd 2018-03-26 03:40:51 +02:00
Superstar64
e88c44d181 rdmd: support --eval <arg> to make it Makefile friendly 2018-03-26 03:13:21 +02:00
The Dlang Bot
9d414d2e30
Merge pull request #341 from WebDrake/fix-of-od-flags
rdmd: support -of=... and -od=... flags as well as -of... and -od...
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2018-03-25 20:49:05 +02:00
Joseph Rushton Wakeling
348610de2d rdmd: fix parsing of -o- and -op command-line flags
By checking only `value[0]`, the `dashOh` callback used to parse `-o...`
flags would give false positives (e.g. for `-o-foo` or `-opbar`).  This
patch fixes the discrepancy by requiring exact comparison to `value`.

A few test cases have been added to `rdmd_test` to cover these failures.

Thanks to @CyberShadow for spotting the bug and proposing the fix.
2018-03-25 19:35:14 +02:00
Joseph Rushton Wakeling
8f84fcda79 rdmd: support -of=... and -od=... flags as well as -of... and -od...
This fixes a discrepancy between `rdmd` and `dmd` in terms of the output
flags they support: `dmd` now requests `-of=...` and `-od=...` in help
output but still supports the old `-of...` and `-od...` style, while
`rdmd` was still supporting only the older variant.

Thanks to @CyberShadow for suggesting the `skipOver`-based solution.

Extra test cases have been added to `rdmd_test` to cover this, although
the way this has been done is a little bit cheeky (it turns out the only
place where `-of` and `-od` are really tested rigorously is in tests for
the case where the output file is a library in a subdirectory).  At some
point it would be a good idea to add some more rigorous test cases for
the `-o...` flags, but in the short term the tests added in this patch
should validate the changes to `rdmd` itself.
2018-03-25 19:33:19 +02:00
The Dlang Bot
cf1124afcf
Merge pull request #337 from marler8997/rdmdTestVerifyDefaultCompiler
Verify default compiler in help text matches given default compiler
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2018-03-20 02:27:03 +01:00
The Dlang Bot
15cc8295bb
Merge pull request #335 from marler8997/rdmdNonOptionArg
Since --rdmd is required, made it a "non-option" argument instead of an "option that is [REQUIRED]"
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2018-03-19 14:51:24 +01:00
Jonathan Marler
0aeb69a84b Verify default compiler in help text matches given default compiler 2018-03-19 07:37:44 -06:00
Jonathan Marler
2995c873ae Since --rdmd is required, made it a "non-option" argument instead of an "option that is [REQUIRED]"
Non-option arguments are more conventional than "required options".
2018-03-19 07:03:48 -06:00
The Dlang Bot
9a03b14dd9
Merge pull request #333 from marler8997/rdmdRelativeCompilers
support relative compiler filenames in rdmd_test
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2018-03-19 13:07:44 +01:00
The Dlang Bot
0dcb434e28
Merge pull request #334 from marler8997/rdmdTestNonCompiler
Split compiler agnostic tests so they are only run once instead of once per compiler
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2018-03-19 13:06:10 +01:00
Jonathan Marler
328a545e59 Split compiler agnostic tests so they are only run once instead of once per compiler 2018-03-18 20:41:00 -06:00
Jonathan Marler
6747242c1a support relative compiler filenames in rdmd_test 2018-03-18 20:36:09 -06:00
The Dlang Bot
fcf96c84e6
Merge pull request #332 from WebDrake/fix-test-tools-cleanup
posix.mak, win32.mak: Ensure `clean` target removes all generated files and directories
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2018-03-19 03:00:31 +01:00
Joseph Rushton Wakeling
641438ed3f win32.mak: ensure clean target removes all generated files and dirs
The `clean` target has been updated to remove the entire directory of
files generated by the build, together with all its contents.  This
matches what is done in the dmd, druntime, and phobos makefiles, and
should be much more maintainable, since it no longer relies on correct
specification of all the individual files that need removing.

As a byproduct, this fixes an oversight in the old `clean` target which
meant that `rdmd_test.exe` was not being removed.

The `ROOT_OF_THEM_ALL` variable has been renamed to `GENERATED` to avoid
any nasty consequences for downstream users who might be overriding the
former in their build scripts.
2018-03-18 18:33:23 +01:00
Joseph Rushton Wakeling
14474ebaff posix.mak: ensure clean target removes all generated files and dirs
The `clean` target has been updated to remove the entire directory of
files generated by the build, together with all its contents.  This
matches what is done in the dmd, druntime, and phobos makefiles, and
should be much more maintainable, since it no longer relies on correct
specification of all the individual files that need removing.

As a byproduct, this fixes an oversight in the old `clean` target which
meant that `rdmd_test` and `tests_extractor` were not being removed.

The `ROOT_OF_THEM_ALL` variable has been renamed to `GENERATED` to avoid
any nasty consequences for downstream users who might be overriding the
former in their build scripts.
2018-03-18 18:28:59 +01:00
Sebastian Wilzbach
977fd056e6
Merge pull request #327 from wilzbach/use-nav-inject
Use CHANGELOG_NAV_INJECT for the changelog generator
2018-03-14 17:19:46 +01:00
Sebastian Wilzbach
412a318bbf Use CHANGELOG_NAV_INJECT for the changelog generator 2018-03-14 13:58:18 +01:00
Sebastian Wilzbach
018a67009a
Merge pull request #328 from WebDrake/refactor-rdmd-test
rdmd_test: rewrite to use externally-specifed rdmd executable
2018-03-14 01:15:43 +01:00
Joseph Rushton Wakeling
93890d9dbb appveyor.yml, win32.mak: add proper support for rdmd_test --model flag 2018-03-13 23:06:24 +01:00
Joseph Rushton Wakeling
833456cac3 appveyor.yml: make win32.mak test target 2018-03-13 23:00:21 +01:00
Joseph Rushton Wakeling
5cc724a687 win32.mak: add test target 2018-03-13 23:00:11 +01:00
Joseph Rushton Wakeling
6d852bf820 win32.mak: add test_rdmd target to match posix.mak
This should ensure that the same `make test_rdmd` options are available
to developers on Windows.
2018-03-13 22:58:55 +01:00
Joseph Rushton Wakeling
4b6ae49f09 rdmd_test: rewrite to use externally-specifed rdmd executable
One key problem of the old `rdmd_test` was that it built its own rdmd
instance to test.  This meant that technically, it was never actually
run against the rdmd executable generated in the regular tools build.

This rewrite fixes this by repurposing the `--rdmd` flag of `rdmd_test`
to require not a path to `rdmd.d` but a path to the rdmd executable for
which the test suite should be run.  The provided executable is not used
directly, but is copied into a temporary directory: this is necessary in
order to run the fallback test, which involves copying a dummy compiler
into the same directory as the tested rdmd executable.

The `--compiler` flag has been removed (since `rdmd_test` no longer uses
it to build rdmd), but a new `--rdmd-default-compiler` flag is required
in order to specify the name of the default compiler for by the tested
rdmd.  This is needed in order to carry out the fallback compiler test,
which will fail if the provided name does not match that of the default
compiler used by the rdmd executable.

The `test_rdmd` target in `posix.mak` has been reworked to use the new
`--rdmd` and `--rdmd-default-compiler` flags.  By default these will be
invoked with the generated `rdmd` instance and the name of the compiler
used to build it, but these choices can be customized respectively with
the new `RDMD_TEST_EXECUTABLE` and `RDMD_TEST_DEFAULT_COMPILER` make
variables.

This should ensure that the rdmd instance generated by the regular build
is properly tested, while allowing `rdmd_test` to be used with arbitrary
`rdmd` instances if any developer should wish to do so.

Top-level module documentation has been tweaked to reflect the new flags
and intended usage, and help information has been added to the `getopt`
call, which will be output if the `-h|--help` flag is used, or if the
user fails to supply the required `--rdmd` or `--rdmd-default-compiler`
flags.
2018-03-13 22:56:42 +01:00
Joseph Rushton Wakeling
632d6a4c84 rdmd_test: clean up temporary rdmdApp on exit
There is no need for `rdmd_test` to manually remove any pre-existing
`/tmp/rdmd_app_`, since  we are going to overwrite it anyway, but it
is good housekeeping to clean it up on exit.
2018-03-13 22:06:01 +01:00
Joseph Rushton Wakeling
316e38d226 posix.mak: declare all variables used by test_rdmd next to the target
This is just a small piece of cleanup to group together all the various
make variables used with the `test_rdmd` target immediately prior to the
target itself, so they are easier to find and their purpose is easier to
understand.

It should help clarify that these variables are used only with tests and
do not impact application builds.
2018-03-13 22:06:01 +01:00
The Dlang Bot
26d2055fda
Merge pull request #329 from wilzbach/bugzilla-badge
Add badge to Bugzilla
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2018-03-11 17:40:48 +01:00
Sebastian Wilzbach
b1977b30fc Add badge to Bugzilla 2018-03-11 16:56:47 +01:00
Sebastian Wilzbach
203e611224
Merge pull request #326 from MartinNowak/merge_stable
Merge remote-tracking branch 'upstream/stable' into merge_stable
2018-02-27 22:06:23 +01:00
Martin Nowak
721dc061ae Merge remote-tracking branch 'upstream/stable' into merge_stable 2018-02-27 20:12:44 +01:00
Martin Nowak
962dcbe1b2
Merge pull request #325 from MartinNowak/changed
adapt changed tool to retrieve still open bugs
2018-02-27 18:00:13 +01:00
Martin Nowak
9c1ea4686a adapt changed tool to retrieve still open bugs
- as we switched to only auto-close bugs when their fix lands in master
2018-02-27 17:55:07 +01:00
The Dlang Bot
807671e8cc
Merge pull request #316 from dkgroot/fix_make
[Trivial] Update tools:posix.mak
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2018-02-23 00:05:18 +01:00
Diederik de Groot
140a4c8beb Remove pragma(lib, curl)
Phobos uses `dlopen` to load curl.
2018-02-22 23:44:18 +01:00
The Dlang Bot
7df2819369
Merge pull request #323 from wilzbach/hector
Add aliases for Héctor Barreras Almarcha
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2018-02-20 18:45:46 +01:00