]> https://gitweb.dealii.org/ - dealii.git/commit
Use initlog() in more tests. 14719/head
authorDavid Wells <drwells@email.unc.edu>
Tue, 24 Jan 2023 18:28:15 +0000 (13:28 -0500)
committerDavid Wells <drwells@email.unc.edu>
Tue, 24 Jan 2023 18:33:26 +0000 (13:33 -0500)
commitd59afbd3ede1363b1b07a749017fe50bbb544214
treeedf7105bcbed2c232ac3ecc139667b8207d28d16
parent069d370c2f0fe89325e0c78ffb9c0deaf5517777
Use initlog() in more tests.

These required a small amount of manual tidying-up but the script I used to
generate most of the changes is

#!/usr/bin/env python3

import sys

lines = list()
skip_next_if_blank = False
with open(sys.argv[1], 'r') as handle:
    for line in handle:
        if line != 'std::ofstream logfile("output");\n':
            if "deallog.attach" not in line:
                if skip_next_if_blank and line == "\n":
                    pass
                else:
                    lines.append(line.replace("logfile",
                                              "deallog.get_file_stream()"))
                    skip_next_if_blank = False
        else:
            skip_next_if_blank = True

found_main = False
line_after_main = -1
with open(sys.argv[1], 'w') as handle:
    for line in lines:
        handle.write(line)
        if line.startswith("main("):
            found_main = True
        if found_main:
            line_after_main = line_after_main + 1
        if line_after_main == 1:
            handle.write("  initlog();\n")
80 files changed:
tests/bits/step-10-high-order.cc
tests/bits/step-10.cc
tests/bits/step-12.cc
tests/bits/step-2.cc
tests/bits/step-3.cc
tests/bits/subdomain_ids_01.cc
tests/bits/subdomain_ids_02.cc
tests/bits/subdomain_ids_03.cc
tests/bits/subdomain_ids_04.cc
tests/bits/subdomain_ids_05.cc
tests/bits/subdomain_ids_06.cc
tests/bits/subdomain_ids_07.cc
tests/dofs/dof_test.cc
tests/dofs/dof_tools_21_b.cc
tests/dofs/dof_tools_21_b_x.cc
tests/dofs/dof_tools_21_b_x_q3.cc
tests/dofs/dof_tools_21_b_y.cc
tests/dofs/dof_tools_21_c.cc
tests/fail/abf_approximation_01.cc
tests/fail/rt_distorted_01.cc
tests/fail/rt_distorted_02.cc
tests/fe/bdm_10.cc
tests/fe/bdm_11.cc
tests/fe/bdm_12.cc
tests/fe/bdm_13.cc
tests/fe/bdm_14.cc
tests/fe/bdm_15.cc
tests/fe/bdm_16.cc
tests/fe/bdm_8.cc
tests/fe/bdm_9.cc
tests/fe/br_approximation_01.cc
tests/fe/numbering.cc
tests/fe/rt_10.cc
tests/fe/rt_11.cc
tests/fe/rt_12.cc
tests/fe/rt_13.cc
tests/fe/rt_14.cc
tests/fe/rt_15.cc
tests/fe/rt_8.cc
tests/fe/rt_9.cc
tests/fe/rt_approximation_01.cc
tests/fe/rt_bubbles_10.cc
tests/fe/rt_bubbles_11.cc
tests/fe/rt_bubbles_16.cc
tests/fe/rt_bubbles_8.cc
tests/fe/rt_bubbles_9.cc
tests/fe/rt_normal_02.cc
tests/grid/grid_generator_non_standard_orientation_mesh_2d.cc
tests/grid/grid_generator_non_standard_orientation_mesh_3d.cc
tests/lac/constraints.cc
tests/lac/constraints_block_01.cc
tests/lac/constraints_hanging_nodes_bc.cc
tests/lac/constraints_local_to_global.cc
tests/lac/constraints_local_to_global_chunk.cc
tests/lac/constraints_merge.cc
tests/lac/constraints_merge_02.cc
tests/lac/constraints_merge_03.cc
tests/lac/constraints_merge_04.cc
tests/lac/constraints_merge_05.cc
tests/lac/constraints_merge_06.cc
tests/lac/constraints_merge_07.cc
tests/lac/constraints_merge_08.cc
tests/lac/constraints_merge_09.cc
tests/lac/inhomogeneous_constraints.cc
tests/lac/inhomogeneous_constraints_02.cc
tests/lac/inhomogeneous_constraints_03.cc
tests/lac/inhomogeneous_constraints_04.cc
tests/lac/inhomogeneous_constraints_block.cc
tests/lac/inhomogeneous_constraints_nonsymmetric.cc
tests/lac/inhomogeneous_constraints_vector.cc
tests/slepc/00.cc
tests/slepc_complex/00.cc
tests/sparsity/dynamic_sparsity_pattern_06.cc
tests/trilinos/assemble_matrix_parallel_01.cc
tests/trilinos/assemble_matrix_parallel_02.cc
tests/trilinos/assemble_matrix_parallel_03.cc
tests/trilinos/assemble_matrix_parallel_04.cc
tests/trilinos/assemble_matrix_parallel_05.cc
tests/trilinos/assemble_matrix_parallel_06.cc
tests/trilinos/assemble_matrix_parallel_07.cc

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.