[petsc-dev] remove temporary output with new test-harness

Stefano Zampini stefano.zampini at gmail.com
Sun Dec 3 03:44:00 CST 2017


The issue may arise with output files from a previous test run.
Would it be possible to  run ‘rm -rf *’ in the example temporary directory before running the test?

Thanks,
Stefano

> On Nov 29, 2017, at 8:36 PM, Scott Kruger <kruger at txcorp.com> wrote:
> 
> 
> 
> On 11/29/17 10:25 AM, Matthew Knepley wrote:
>> On Wed, Nov 29, 2017 at 11:23 AM, Scott Kruger <kruger at txcorp.com <mailto:kruger at txcorp.com>> wrote:
>>    The generated scripts automatically run in a subdirectory to avoid
>>    name conflicts.  For example, runex1.sh creates a runex1 directory
>>    relative
>>    to its location and then runs the actual test in there.  These
>>    temporary directories are not removed automatically by the test
>>    harness as it hasn't been a problem yet.
>> Okay, then it would be nice to give a list of files to be removed after the test.
> 
> Why?    It's all in $PETSC_ARCH/tests which is meant to be ephemeral in the same way that $PETSC_ARCH/objs is.
> 
> If it turns out that disk space is an issue (like it is for the executables themselves), then we can have the scripts remove that temporary directory after the test is run easily enough, but we still don't need to have all of the coding related to figuring out which files were generated (and tip of the hat to Jed who had the idea of running in the subdirectories to avoid name conflicts to begin with).
> 
> Scott
> 
> 
>>   Thanks,
>>      Matt
>>    Scott
>>    On 11/29/17 9:43 AM, Matthew Knepley wrote:
>>        On Wed, Nov 29, 2017 at 10:38 AM, Scott Kruger
>>        <kruger at txcorp.com <mailto:kruger at txcorp.com>
>>        <mailto:kruger at txcorp.com <mailto:kruger at txcorp.com>>> wrote:
>>             rm $PETSC_ARCH/tests/<path_to_file>/<file>
>>             I assume you really mean something else, specifically
>>        related to the
>>             generated test script, but there isn't enough information
>>        to answer
>>             that.
>>             Or more specifically, the test language was not written to
>>        generate
>>             scripts that have an `rm` command in them, so perhaps
>>        explaining why
>>             an extension would be a good idea.]
>>        I think what Stefano means is the following;
>>            I write a test for the HDF5 Viewer. It creates a file called
>>        "vector.dat". I want it removed at the end of the test.
>>        I think the answer is, the test directory is blown away, so as
>>        long as the file is in that temp dir, you are fine.
>>            Thanks,
>>               Matt
>>             Scott
>>             On 11/29/17 6:02 AM, Stefano Zampini wrote:
>>                 How can I remove a file created by the executable I'm
>>        testing
>>        with the new test har
>>        <https://maps.google.com/?q=with+the+new+test+har&entry=gmail&source=g>ness?
>>                 --         Stefano
>>             --     Tech-X Corporation kruger at txcorp.com
>>        <mailto:kruger at txcorp.com> <mailto:kruger at txcorp.com
>>        <mailto:kruger at txcorp.com>>
>>             5621 Arapahoe Ave, Suite A       Phone: (720) 974-1841
>>        <tel:%28720%29%20974-1841>
>>             <tel:%28720%29%20974-1841>
>>             Boulder, CO 80303                Fax: (303) 448-7756
>>        <tel:%28303%29%20448-7756>
>>             <tel:%28303%29%20448-7756>
>>        --         What most experimenters take for granted before they begin their
>>        experiments is infinitely more interesting than any results to
>>        which their experiments lead.
>>        -- Norbert Wiener
>>        https://www.cse.buffalo.edu/~knepley/
>>        <https://www.cse.buffalo.edu/~knepley/>
>>        <http://www.caam.rice.edu/~mk51/ <http://www.caam.rice.edu/~mk51/>>
>>    --     Tech-X Corporation kruger at txcorp.com <mailto:kruger at txcorp.com>
>>    5621 Arapahoe Ave, Suite A       Phone: (720) 974-1841
>>    <tel:%28720%29%20974-1841>
>>    Boulder, CO 80303                Fax: (303) 448-7756
>>    <tel:%28303%29%20448-7756>
>> -- 
>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
>> -- Norbert Wiener
>> https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
> 
> -- 
> Tech-X Corporation               kruger at txcorp.com
> 5621 Arapahoe Ave, Suite A       Phone: (720) 974-1841
> Boulder, CO 80303                Fax:   (303) 448-7756



More information about the petsc-dev mailing list