www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Platform specific DMD tests

reply Jacob Carlborg <doob me.com> writes:
I'm working on the D/Objective-C integration. There's a bunch of new 
tests added that should only be run on OS X. Currently these are in a 
separate test suite. How should these tests be handled? Should they stay 
in a separate test suite, exclude the files from the current makefile 
somehow or something else?

-- 
/Jacob Carlborg
Sep 10 2014
parent reply Andrej Mitrovic via Digitalmars-d <digitalmars-d puremagic.com> writes:
On 9/10/14, Jacob Carlborg via Digitalmars-d
<digitalmars-d puremagic.com> wrote:
 I'm working on the D/Objective-C integration. There's a bunch of new
 tests added that should only be run on OS X. Currently these are in a
 separate test suite. How should these tests be handled? Should they stay
 in a separate test suite, exclude the files from the current makefile
 somehow or something else?
When I had to test windows-specific stuff I put the actual test files in /extra-files/. Here's an example: https://github.com/D-Programming-Language/dmd/blob/master/test/compilable/test9680.sh So you could simply exit if ${OS} does not equal OSX (not sure what the actual string is), otherwise run the test-suite. But maybe there's a simpler way. Kenji/yebblies/others?
Sep 10 2014
next sibling parent reply "Daniel Murphy" <yebbliesnospam gmail.com> writes:
"Andrej Mitrovic via Digitalmars-d"  wrote in message 
news:mailman.692.1410352187.5783.digitalmars-d puremagic.com...

 When I had to test windows-specific stuff I put the actual test files
 in /extra-files/. Here's an example:

 https://github.com/D-Programming-
 Language/dmd/blob/master/test/compilable/test9680.sh

 So you could simply exit if ${OS} does not equal OSX (not sure what
 the actual string is), otherwise run the test-suite.

 But maybe there's a simpler way. Kenji/yebblies/others?
I'd say just disable them in the makefile for all other platforms, if they don't need a custom script.
Sep 10 2014
parent reply Jacob Carlborg <doob me.com> writes:
On 10/09/14 15:19, Daniel Murphy wrote:

 I'd say just disable them in the makefile for all other platforms, if
 they don't need a custom script.
Some of the need to compile Objective-C code. -- /Jacob Carlborg
Sep 10 2014
parent reply "Daniel Murphy" <yebbliesnospam gmail.com> writes:
"Jacob Carlborg"  wrote in message news:lupobq$26pp$1 digitalmars.com...

 Some of the need to compile Objective-C code.
Are you planning to do that with shell scripts or by adding a feature to d_do_test? You could fairly easily add EXTRA_OBJC_FILES to d_do_test and then disable building on non-osx platforms when it's present, even if it has zero files.
Sep 10 2014
parent reply Jacob Carlborg <doob me.com> writes:
On 2014-09-10 17:09, Daniel Murphy wrote:

 Are you planning to do that with shell scripts or by adding a feature to
 d_do_test?
Currently this is done using REQUIRED_ARGS and $(), something like this: // REQUIRED_ARGS: objc.o $(gcc -m$MODEL objc.m -c -o objc.o)
 You could fairly easily add EXTRA_OBJC_FILES to d_do_test
 and then disable building on non-osx platforms when it's present, even
 if it has zero files.
Do you mean a new special comment and which I would add to all Objective-C related tests? -- /Jacob Carlborg
Sep 10 2014
parent "Daniel Murphy" <yebbliesnospam gmail.com> writes:
"Jacob Carlborg"  wrote in message news:luq87l$2q3k$1 digitalmars.com... 

 Do you mean a new special comment and which I would add to all 
 Objective-C related tests?
Yes.
Sep 10 2014
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 10/09/14 14:04, Andrej Mitrovic via Digitalmars-d wrote:

 When I had to test windows-specific stuff I put the actual test files
 in /extra-files/. Here's an example:

 https://github.com/D-Programming-Language/dmd/blob/master/test/compilable/test9680.sh

 So you could simply exit if ${OS} does not equal OSX (not sure what
 the actual string is), otherwise run the test-suite.
That is a shell script? Will d_do_test handle invoking that? -- /Jacob Carlborg
Sep 10 2014
parent Andrej Mitrovic via Digitalmars-d <digitalmars-d puremagic.com> writes:
On 9/11/14, Jacob Carlborg via Digitalmars-d
<digitalmars-d puremagic.com> wrote:
 That is a shell script? Will d_do_test handle invoking that?
Well it does run it. :)
Sep 11 2014