[PATCH] Add tests for gcc-changelog.

Martin Liška mliska@suse.cz
Thu May 14 11:58:57 GMT 2020


On 5/14/20 1:27 PM, Jakub Jelinek wrote:
> On Thu, May 14, 2020 at 12:11:50PM +0200, Martin Liška wrote:
>> I would like to add unit-tests for gcc-changelog.
>> The test_patches.txt contains couple of patches extracted from gcc
>> via git format-patch.
>>
>> Test output:
>> $ pytest contrib/gcc-changelog/
>> Test session starts (platform: linux, Python 3.8.2, pytest 4.6.9, pytest-sugar 0.9.3)
>> benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
>> rootdir: /home/marxin/Programming/gcc
>> plugins: xdist-1.32.0, sugar-0.9.3, forked-1.1.3, benchmark-3.2.3, aspectlib-1.5.0, cov-2.8.1, flake8-1.0.5
>> collecting ...
>>   contrib/gcc-changelog/test_email.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓
>>
>> Results (0.15s):
>>        31 passed
>>
>> Ready to be installed?
> 
> If we want it in the gcc tree (not sure about that, the other option is for
> it to live in a separate repo),

I definitely want to have test-cases in the gcc repository and not in a separate
repository.

> I'd be strongly for significantly cutting
> down the size of the patches.  All the script cares about is what files
> are modified in the patch and what files are added, right?
> So, replace all new file additions with
> @@ -0,0 +1 @@
> +
> and all file modifications with
> @@ -1 +1,2 @@
>   
> +

I've just done that, good idea.
I'm going to install the patch.

Thanks,
Martin

> 
> 	Jakub
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-tests-for-gcc-changelog.patch
Type: text/x-patch
Size: 92181 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200514/ab81e2ed/attachment-0001.bin>


More information about the Gcc-patches mailing list