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'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 @@
 
+

        Jakub

Reply via email to