1*dbfe9819SMasatake YAMATO.. _testing_readtags: 2*dbfe9819SMasatake YAMATO 3*dbfe9819SMasatake YAMATO============================================================================= 4*dbfe9819SMasatake YAMATOTesting readtags 5*dbfe9819SMasatake YAMATO============================================================================= 6*dbfe9819SMasatake YAMATO 7*dbfe9819SMasatake YAMATO*roundtrip* target verifies the behavior of readtags command. It 8*dbfe9819SMasatake YAMATOreuses `expected.tags` files under Units as input files for readtags. 9*dbfe9819SMasatake YAMATOAll tags in all `expected.tags` files are searched with readtags. If a 10*dbfe9819SMasatake YAMATOtag cannot be found with readtags, the roundtrip target reports the readtags 11*dbfe9819SMasatake YAMATOcommand line that specifies the tag and the path for `expected.tags` file. 12*dbfe9819SMasatake YAMATO 13*dbfe9819SMasatake YAMATOExample of running the target 14*dbfe9819SMasatake YAMATO 15*dbfe9819SMasatake YAMATO.. code-block:: console 16*dbfe9819SMasatake YAMATO 17*dbfe9819SMasatake YAMATO $ make roundtrip 18*dbfe9819SMasatake YAMATO FAILED: ./readtags -t Units/sh-statements.d/expected.tags -starting-with-dash 19*dbfe9819SMasatake YAMATO FAILED: ./readtags -t Units/sh-statements.d/expected.tags -starting-with-dash_2 20*dbfe9819SMasatake YAMATO FAILED: ./readtags -t Units/sh-statements.d/expected.tags -starting-with-dash_inner 21*dbfe9819SMasatake YAMATO FAILED: ./readtags -t Units/parser-c.r/backslash-at-the-end-of-pattern.d/expected.tags M 22*dbfe9819SMasatake YAMATO FAILED: ./readtags -t Units/simple-diff.d/expected.tags -0,0 23*dbfe9819SMasatake YAMATO FAILED: ./readtags -t Units/simple-diff.d/expected.tags -1,2 24*dbfe9819SMasatake YAMATO FAILED: ./readtags -t Units/simple-diff.d/expected.tags -28,6 25*dbfe9819SMasatake YAMATO FAILED: ./readtags -t Units/simple-diff.d/expected.tags -44,6 26*dbfe9819SMasatake YAMATO FAILED: ./readtags -t Units/review-needed.r/3526726.tex.t/expected.tags -r 27*dbfe9819SMasatake YAMATO ... 28*dbfe9819SMasatake YAMATO Makefile:498: recipe for target 'roundtrip' failed 29*dbfe9819SMasatake YAMATO make: *** [roundtrip] Error 1 30*dbfe9819SMasatake YAMATO 31*dbfe9819SMasatake YAMATO 32*dbfe9819SMasatake YAMATOOn CI/CD environments, the target uses only marked `expected.tags` 33*dbfe9819SMasatake YAMATOfiles instead of using all the `expected.tags` files because the 34*dbfe9819SMasatake YAMATOroundtrip target took too long time. 35*dbfe9819SMasatake YAMATO 36*dbfe9819SMasatake YAMATOAn empty file named `minitrip` acts as the marker. Before processing 37*dbfe9819SMasatake YAMATOan `expected.tags`, the target looks for `minitrip` file at the 38*dbfe9819SMasatake YAMATOdirectory where `expected.tags` is. If it finds `minitrip` file, the 39*dbfe9819SMasatake YAMATOtarget processes the `expected.tags`. If not, the target ignores the 40*dbfe9819SMasatake YAMATO`expected.tags`. 41