Skip to content
Snippets Groups Projects
  • Gleb Kashkin's avatar
    635b5a1d
    test: make treegen.clean more durable · 635b5a1d
    Gleb Kashkin authored
    Usually treegen.clean is called after a test by g.after_all function
    or an equivalent. In some rare cases internal helpers use their own
    treegen and clean up after themself. In such a case, treegen.clean
    would look for an internal list of all directories and find nil. This
    causes an error in ipairs iteration in internal logic and fails the
    whole test.
    
    This patch adds minor durability improvement for such a case. Now if
    internal list of all directories is nil (e.g. when treegen.clean was
    called beforehand), the function does nothing.
    
    Part of #8967
    
    NO_DOC=test helper update
    NO_CHANGELOG=see NO_DOC
    NO_TEST=see NO_DOC
    
    (cherry picked from commit 9b0896d9)
    635b5a1d
    History
    test: make treegen.clean more durable
    Gleb Kashkin authored
    Usually treegen.clean is called after a test by g.after_all function
    or an equivalent. In some rare cases internal helpers use their own
    treegen and clean up after themself. In such a case, treegen.clean
    would look for an internal list of all directories and find nil. This
    causes an error in ipairs iteration in internal logic and fails the
    whole test.
    
    This patch adds minor durability improvement for such a case. Now if
    internal list of all directories is nil (e.g. when treegen.clean was
    called beforehand), the function does nothing.
    
    Part of #8967
    
    NO_DOC=test helper update
    NO_CHANGELOG=see NO_DOC
    NO_TEST=see NO_DOC
    
    (cherry picked from commit 9b0896d9)