This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] [binutils][testsuite] Allow multiple lines of "as" in testsuite.


On 13/02/19 06:51, Alan Modra wrote:
> On Thu, Feb 07, 2019 at 06:20:19PM +0000, Matthew Malcomson wrote:
>> This allows checking the command line parsing more easily than before by
>> allowing many command line invokations from the same .d file.
> 
> It seems to me that you can do this by writing a wrapper that invokes
> run_dump_test, once for each of the multiple "as" options, passing
> them in extra_options.
> 
> Another solution is to use the "#dump:" and "#source:" options from a
> stub .d file, eg. gas/testsuite/gas/i386/ilp32/x86-64-opts.d
> 
> Did you consider something along those lines instead?
> 
Hi Alan,

I had considered the '#dump:' and '#source:' options, but I hadn't 
thought of using a wrapper (I'm not sure what the wrapper would look like).


My aim was to avoid having to create a new file for each assembler 
command line test, so I went with this to make it as easy as possible to 
run with multiple gas options.

I was doing some not yet released work and caught myself being lazy and 
testing only a few command line combinations to avoid creating ~8 extra 
stub files, so I thought this might be a solution.
(n.b. at the time I was working off an older branch where the 
run_dump_test procedure hadn't been shared between all testsuites, so 
treating "as" specially was more natural).


I guess by a wrapper you mean something like the below in a local TCL file.

if { [file-is-x] } { run-many-with-gas-opts "....." }
elseif { [file-is-y] } { run-many-with-gas-opts "...." }
elseif ...

I think the extra lines in a .d file makes what's happening clearer and 
is easier to use, but since this avoids complicating the run_dump_test 
procedure any more the wrapper makes a lot of sense too.

Cheers,
Matthew

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]