[Scons-users] Fwd: Writing test cases for Issue 2615

Adarsh Sanjeev adarshsanjeev at gmail.com
Tue Oct 11 16:00:47 EDT 2016


Hi,

Yes, I had pushed it after, just some timezone issues which changed the
time. I did not inherit CacheReadOnlyTestCase from BaseTestCase, as I
needed a setup and teardown functions which changes the permission of the
caches parent directory, so even If I had inherited it, I would have to
override those two functions anyway.

Thank you!

On Tue, Oct 11, 2016 at 6:32 PM, William Blevins <wblevins001 at gmail.com>
wrote:

> Adarsh,
>
> Did you push your additional changes? The only commits in your repo are
> listed from 9/4/2016 which is prior to Dirk's comments.
>
> I noticed that the latest b1abe00
> <https://bitbucket.org/adarshsanjeev/scons/commits/b1abe00dc4b82697f6a3b508ecffca359a4712f2>
> do not inherit CacheReadOnlyTestCase from BaseTestCase which already
> provides an self.fs and self.File which may be useful.
>
> V/R,
> William
>
> On Tue, Oct 11, 2016 at 3:18 AM, Adarsh Sanjeev <adarshsanjeev at gmail.com>
> wrote:
>
>> Hi,
>>
>> I was working on Issue #2615, and was stuck at a point, so I had sent an
>> email, for some information, but I did not get any replies, hence, I am
>> sending it again.
>>
>> Thank you!
>>
>> ---------- Forwarded message ----------
>> From: Adarsh Sanjeev <adarshsanjeev at gmail.com>
>> Date: Tue, Sep 6, 2016 at 8:15 AM
>> Subject: Re: [Scons-users] Writing test cases for Issue 2615
>> To: SCons users mailing list <scons-users at scons.org>
>>
>>
>> Hi,
>>
>> I have made the changes that were suggested, but I am unable to
>> understand part of the code. In all the TestCases, in the setUp, TestCmd is
>> used to create a temporary directory. However, this is not passed to the
>> CacheDir constructor, and the cache is made in the scons directory itself.
>> I do not understand why the Cache is not made in the temporary directory.
>> If this is the intended behaviour, should I make the permission of the
>> scons directory read only?
>>
>> Thanks!
>>
>> On Mon, Sep 5, 2016 at 9:32 PM, Dirk Bächle <tshortik at gmx.de> wrote:
>>
>>> Hi Adarsh,
>>>
>>> the "test_*" methods themselves shouldn't "return" (=possibly skipping
>>> parts of the test) and for the basic checking of exceptions you might want
>>> to have a look at "test_warning()" in the same file.
>>>
>>> To my knowledge there is no function built-in to SCons for checking the
>>> attributes of a directory entry, but using Python modules/packages is fine
>>> in general.
>>>
>>> Best regards,
>>>
>>> Dirk
>>>
>>> On 04.09.2016 08:51, Adarsh Sanjeev wrote:
>>>
>>>> Hi,
>>>>
>>>> I am trying to solve Issue 2615 on the tracker (No error on create
>>>> Cache in read only directory).
>>>>
>>>> I have, so far, added another test case to
>>>> engine/Scons/CacheDirTests.py, where I make the directory read only and
>>>> calls the
>>>> CacheDir constructor there. If it finishes the constructor without any
>>>> exception, I fail the test.
>>>>
>>>> These
>>>> <https://bitbucket.org/adarshsanjeev/scons/src/b1abe00dc4b82
>>>> 697f6a3b508ecffca359a4712f2/src/engine/SCons/CacheDirTests.p
>>>> y?at=default&fileviewer=file-view-default#CacheDirTests.py-90>
>>>> are the changes I made. Is this okay so far?
>>>>
>>>> On fixing the issue itself, is there any function within scons to check
>>>> if a directory is writable or should I just use the os module?
>>>>
>>>> --
>>>> Adarsh Sanjeev
>>>>
>>>>
>>>> _______________________________________________
>>>> Scons-users mailing list
>>>> Scons-users at scons.org
>>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>>
>>>>
>>> _______________________________________________
>>> Scons-users mailing list
>>> Scons-users at scons.org
>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>
>>
>>
>>
>> --
>> Adarsh Sanjeev
>>
>>
>>
>> --
>> Adarsh Sanjeev
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>


-- 
Adarsh Sanjeev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20161011/e910c80b/attachment.html>


More information about the Scons-users mailing list