How to write each test vector to a separate file?

A place for discussing the creation of test driver schemas, customizing of object mapping files, developing Perl script subroutines to enhance the test driver schema language, and the generation of test drivers.

How to write each test vector to a separate file?

Postby jack » Fri Sep 05, 2008 10:36 pm

Hi,

How to write each test vector to a separate file?

Regards,

Jack
jack
 
Posts: 16
Joined: Sat Mar 15, 2008 9:59 am

Re: How to write each test vector to a separate file?

Postby busser » Sun Sep 07, 2008 8:20 pm

Hi Jack,

The test driver schema language and mechanism is designed to output everything in the TEST_DRIVER_SCHEMA area to a file in the test drivers folder called <subsystemName>.drv. However, this can be modified with the metatoken

<output=filename>
<output_append=filename>

The <output=filename> opens a new file by the name of "filename" and directs all output from the TEST_DRIVER_SCHEMA processing into that file. The <output_append=filename> opens an existing file by the name of "filename" and appends all output from the TEST_DRIVER_SCHEMA processing into that file. Thus, to output each test vector to its own test driver file all you need to do is something like this

<subsystem->vectors...>
{<\+>
<output=test_number_<vector->num>.txt><\+>

*** Place test driver description here ***

}<\+>

This will open up a new file called test_number_<number>.txt for each test vector.

A brief description of the syntax of these metatokens can be seen in the MetaToken browser window that is available through the VGS "View->MetaToken Browswer" menu item.

view_metatoken_browser.png
view_metatoken_browser.png (35.45 KiB) Viewed 3568 times


output_metatoken.png
output_metatoken.png (15.18 KiB) Viewed 3572 times


Please let me know if you have any further questions.
busser
Site Admin
 
Posts: 52
Joined: Thu Mar 13, 2008 7:42 pm


Return to Test Driver Generation

Who is online

Users browsing this forum: No registered users and 1 guest

cron