Route all tests through d_do_test#8129
Conversation
|
Thanks for your pull request and interest in making D better, @marler8997! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#8129" |
4ac2741 to
7953d4d
Compare
test/tools/d_do_test.d
Outdated
| string test_name = args[2]; | ||
| string test_extension = args[3]; | ||
| auto test_file = args[1]; | ||
| auto result = matchFirst(test_file, `^([^/^\\]+)[/\\]([^\.]+)\.(.+)$`); |
There was a problem hiding this comment.
Does this need to be RegExp? Doesn't baseName + stripExtension work too?
test/tools/d_do_test.d
Outdated
| { | ||
| auto process = spawnProcess(["./tools/sh_do_test.sh".replace("/", envData.sep), | ||
| input_dir, test_name]); | ||
| return process.wait(); |
There was a problem hiding this comment.
Why not std.process.execute if you wait anyhow?
There was a problem hiding this comment.
not capturing stdout/stderr
e171b64 to
3cdbcab
Compare
wilzbach
left a comment
There was a problem hiding this comment.
Nice & one step closer to making it easier for people on Windows to run the testsuite :)
test/tools/d_do_test.d
Outdated
| auto test_file = args[1]; | ||
| string input_dir = test_file.dirName; | ||
| string test_base_name = test_file.baseName; | ||
| string test_name = test_base_name.stripExtension(); |
There was a problem hiding this comment.
This is a bit inconsistent here. All three are functions ;-)
(by "your majority vote" maybe adapt stripExtension?)
test/tools/d_do_test.d
Outdated
| if (test_base_name.extension() == ".sh") | ||
| { | ||
| auto process = spawnShell(format("%s %s %s", | ||
| "./tools/sh_do_test.sh".replace("/", envData.sep), input_dir, test_name)); |
There was a problem hiding this comment.
"tools".buildPath("sh_do_test.sh") ?
d17b1c3 to
49458ea
Compare
|
|
Can't merge if there's failing tests, so that will need to be addressed first. Other than that, so far seems reasonable. |
|
Closing and reopening to see if the appveryor failure is a red herring... |
60568b9 to
299a8e1
Compare
|
FYI I already restarted it twice before posting the error, so I think the error is a permanent one. It probably has something to do with AppVeyor's setup of Cygwin. |
| exit 1 | ||
| fi | ||
|
|
||
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
There was a problem hiding this comment.
Why did you remove this?
This allows the script to be called from anywhere (in the future at least)
There was a problem hiding this comment.
I think this might be why AppVeyor is failing...I"ve removed it to see if it fixes the issue... I know removing it is more "brittle". If this works, maybe I should redefined it to something like ${TEST_DIR}/../tools? I don't like it as much. The fact that Bash script files don't have an easy way to get their own directory is such a pain. This is one of the only things that BATCH has over Bash :) (%~dp0....done)
There was a problem hiding this comment.
Adding bash to the beginning of the spawnShell command seems to have fixed the AppVeyor issue.
|
Yeah, I've been seeing a bunch of different errors on AppVeyor recently in other PRs but this one is consistent. Looks like it might be the definition of |
299a8e1 to
493af98
Compare
Provides a common entry point for all tests to perform common setup/operations. Also simplifies the interface to run a test.
493af98 to
c55fc62
Compare
Provides a common entry point for all tests to perform common setup/operations. Also simplifies the interface to run a test (resulting in a simplified Makefile).