Skip to content

Comments

Run rdmd testsuite properly#244

Merged
dlang-bot merged 4 commits intodlang:masterfrom
wilzbach:run-rdmd-test-properly
Jul 4, 2017
Merged

Run rdmd testsuite properly#244
dlang-bot merged 4 commits intodlang:masterfrom
wilzbach:run-rdmd-test-properly

Conversation

@wilzbach
Copy link
Contributor

@wilzbach wilzbach commented Jul 4, 2017

Follow-up to #239 (comment)

This should make (1) it a lot easier to run the test suite properly (after all it's now part of the test Makefile target) and (2) should be a good step into debugging why Travis build succeed.

Currently, however, it fails:

pmake test_rdmd
../dmd/generated/linux/release/64/dmd -I../druntime/import -I../phobos -L-L../phobos/generated/linux/release/64 -m64 -w -de -ofgenerated/linux/64/rdmd_test rdmd_test.d
../phobos/std/parallelism.d(3523): Warning: statement is not reachable
../phobos/std/parallelism.d(3523): Warning: statement is not reachable
make: *** [posix.mak:72: generated/linux/64/rdmd_test] Error 1

I have looked into fixing rdmd_test two weeks ago and the fix for this is still in the Phobos queue: dlang/phobos#5502

CC @CyberShadow

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @wilzbach!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

@wilzbach wilzbach force-pushed the run-rdmd-test-properly branch from 629e42d to ff92a74 Compare July 4, 2017 20:50
@andralex
Copy link
Member

andralex commented Jul 4, 2017

@wilzbach thx!

@wilzbach wilzbach force-pushed the run-rdmd-test-properly branch from d670e5e to a9750db Compare July 4, 2017 21:35
@wilzbach
Copy link
Contributor Author

wilzbach commented Jul 4, 2017

@CyberShadow any idea why this happens on the for MODEL=32?

Argh - it seems like we need to rework the testsuite to include $MODEL

@wilzbach wilzbach force-pushed the run-rdmd-test-properly branch from 8f9d924 to 3c511a7 Compare July 4, 2017 21:59
@wilzbach
Copy link
Contributor Author

wilzbach commented Jul 4, 2017

Wohoo this is finally passing on Travis 🎉
I had to explicitly pass the model in the rdmd_test suite though - @CyberShadow @andralex are you okay with this?

rdmd_test.d Outdated
std.file.write(forceSrc, `void main() { pragma(msg, "compile_force_src"); }`);

res = execute([rdmdApp, compilerSwitch, forceSrc]);
res = execute([rdmdApp, compilerSwitch, modelSwitch, forceSrc]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any instance of compilerSwitch that's not accompanied by an instance of of modelSwitch? If no, then just append model to compilerSwitch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any instance of compilerSwitch that's not accompanied by an instance of of modelSwitch?

Nope, but as execute excepts an array, we can't do ["dmd", "--compiler=foo -m32", ...].
Btw (a bit OT): is there any reason that execute doesn't allow ranges?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just break the array and concatenate sub-arrays.

Anyway I looked and rdmdApp always occurs together with compilerSwitch, so I'd refactor those into an array, so that the invocation looks like execute(rdmdArgs ~ [...])

@wilzbach wilzbach force-pushed the run-rdmd-test-properly branch from 3c511a7 to 6dee858 Compare July 4, 2017 22:24
@wilzbach
Copy link
Contributor Author

wilzbach commented Jul 4, 2017

so I'd refactor those into an array, so that the invocation looks like execute(rdmdArgs ~ [...])

Fair enough. Done.

install_digger() {
$DIGGER build --model=$MODEL "master"
export PATH=$PWD/result/bin:$PATH
export PATH=$PWD/work/result/bin:$PATH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest pinning Digger to a specific version (as with DScanner) to avoid the breaking changes in Digger's master from affecting tools.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay - will do this in another PR

@dlang-bot dlang-bot merged commit c0ddbcd into dlang:master Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants