From f74a581d97a6b64eb9266b9629c4d8037aa65d31 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 22 Feb 2026 15:23:19 -0500 Subject: [PATCH] Tests: Enforce SPDX-FileCopyrightText --- ci/docker/run/hooks/build | 8 ++--- .../t/t_constraint_foreach_classref.py | 8 ++--- test_regress/t/t_constraint_sysfunc.py | 8 ++--- test_regress/t/t_dist_copyright.py | 35 ++++++++----------- .../t/t_event_control_double_excessive.py | 8 ++--- test_regress/t/t_event_control_double_lost.py | 8 ++--- test_regress/t/t_fork_join_none_capture.py | 8 ++--- test_regress/t/t_fork_join_none_inactive.py | 8 ++--- .../t/t_fork_join_none_nested_triggered.py | 8 ++--- test_regress/t/t_fork_join_none_waiters.py | 8 ++--- test_regress/t/t_timing_eval_act.py | 8 ++--- test_regress/t/t_timing_fork_comb_bad.py | 8 ++--- .../t_virtual_interface_only_with_assignw.py | 8 ++--- test_regress/t/t_x_rand_scoped_is_random.py | 8 ++--- 14 files changed, 66 insertions(+), 73 deletions(-) diff --git a/ci/docker/run/hooks/build b/ci/docker/run/hooks/build index 6d2290cae..3ca74378f 100644 --- a/ci/docker/run/hooks/build +++ b/ci/docker/run/hooks/build @@ -1,10 +1,10 @@ #!/bin/bash # DESCRIPTION: Docker hub hook to pass SOURCE_COMMIT # -# Copyright 2020 by Stefan Wallentowitz. This program is free software; you -# can redistribute it and/or modify it under the terms of either the GNU -# Lesser General Public License Version 3 or the Perl Artistic License -# Version 2.0. +# This program is free software; you can redistribute it and/or modify it +# under the terms of either the GNU Lesser General Public License Version 3 +# or the Perl Artistic License Version 2.0. +# SPDX-FileCopyrightText: 2020 Stefan Wallentowitz # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 docker build --build-arg SOURCE_COMMIT=${SOURCE_COMMIT} -f $DOCKERFILE_PATH -t $IMAGE_NAME . diff --git a/test_regress/t/t_constraint_foreach_classref.py b/test_regress/t/t_constraint_foreach_classref.py index 9aaadb3d0..db1adb3f9 100755 --- a/test_regress/t/t_constraint_foreach_classref.py +++ b/test_regress/t/t_constraint_foreach_classref.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2026 by Wilson Snyder. This program is free software; you -# can redistribute it and/or modify it under the terms of either the GNU -# Lesser General Public License Version 3 or the Perl Artistic License -# Version 2.0. +# This program is free software; you can redistribute it and/or modify it +# under the terms of either the GNU Lesser General Public License Version 3 +# or the Perl Artistic License Version 2.0. +# SPDX-FileCopyrightText: 2026 Wilson Snyder # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap diff --git a/test_regress/t/t_constraint_sysfunc.py b/test_regress/t/t_constraint_sysfunc.py index 9aaadb3d0..db1adb3f9 100755 --- a/test_regress/t/t_constraint_sysfunc.py +++ b/test_regress/t/t_constraint_sysfunc.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2026 by Wilson Snyder. This program is free software; you -# can redistribute it and/or modify it under the terms of either the GNU -# Lesser General Public License Version 3 or the Perl Artistic License -# Version 2.0. +# This program is free software; you can redistribute it and/or modify it +# under the terms of either the GNU Lesser General Public License Version 3 +# or the Perl Artistic License Version 2.0. +# SPDX-FileCopyrightText: 2026 Wilson Snyder # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap diff --git a/test_regress/t/t_dist_copyright.py b/test_regress/t/t_dist_copyright.py index 22b67e296..53ee776c6 100755 --- a/test_regress/t/t_dist_copyright.py +++ b/test_regress/t/t_dist_copyright.py @@ -67,43 +67,36 @@ for filename in files: open_filename = os.path.join(test.root, filename) if not os.path.exists(open_filename): continue + + if "test_regress/t" in filename: + yeardash = str(year) + else: + yeardash = str(year) + '-' + str(year) + with open(open_filename, 'r', encoding="utf8") as fh: spdx = None copyright_msg = None - release = False for line in fh: line = line.rstrip() if 'SP' + 'DX-License-Identifier:' in line: spdx = line - elif re.search(r'(Copyright 20[0-9][0-9]|SPDX-FileCopyrightText: 20[0-9][0-9])', line): + elif re.search(r'(SP()DX-FileCopyrightText: 20[0-9][0-9])', line): copyright_msg = line if 'Wilson Snyder' in line: pass - elif re.search(r'\.pl$', filename): - pass elif re.search(EXEMPT_AUTHOR_RE, filename): pass else: - if "test_regress/t" in filename: - yeardash = str(year) - else: - yeardash = str(year) + '-' + str(year) print(" " + copyright_msg) - test.error_keep_going(filename + ": Please use standard 'Copyright " + - yeardash + " by Wilson Snyder'") - elif (('Creative Commons Public Domain' in line) - or ('freely copied and/or distributed' in line) - or ('placed into the Public Domain' in line)): - release = True + test.error_keep_going(filename + ": Please use standard 'SP" + + "DX-FileCopyrightText: " + yeardash + " Wilson Snyder'") - release_note = "" - if not re.search(RELEASE_OK_RE, filename): - release_note = " (has copyright release, but not part of " + RELEASE_OK_RE + ")" - if not copyright_msg and (not release or release_note): - test.error_keep_going(filename + ": Please add standard 'Copyright " + str(year) + - " ...', similar to in other files" + release_note) + if not copyright_msg: + test.error_keep_going(filename + ": Please add standard 'SP" + + "DX-FileCopyrightText: " + yeardash + + " ...', similar to in other files") if not spdx: - test.error_keep_going(filename + ": Please add standard 'SP" + test.error_keep_going(filename + ": Please add standard 'SP" + "DX-License-Identifier: ...', similar to in other files") test.passes() diff --git a/test_regress/t/t_event_control_double_excessive.py b/test_regress/t/t_event_control_double_excessive.py index c33f8d1e2..6fe7d000c 100755 --- a/test_regress/t/t_event_control_double_excessive.py +++ b/test_regress/t/t_event_control_double_excessive.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2026 by Wilson Snyder. This program is free software; you can -# redistribute it and/or modify it under the terms of either the GNU -# Lesser General Public License Version 3 or the Perl Artistic License -# Version 2.0. +# This program is free software; you can redistribute it and/or modify it +# under the terms of either the GNU Lesser General Public License Version 3 +# or the Perl Artistic License Version 2.0. +# SPDX-FileCopyrightText: 2026 Wilson Snyder # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap diff --git a/test_regress/t/t_event_control_double_lost.py b/test_regress/t/t_event_control_double_lost.py index c33f8d1e2..6fe7d000c 100755 --- a/test_regress/t/t_event_control_double_lost.py +++ b/test_regress/t/t_event_control_double_lost.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2026 by Wilson Snyder. This program is free software; you can -# redistribute it and/or modify it under the terms of either the GNU -# Lesser General Public License Version 3 or the Perl Artistic License -# Version 2.0. +# This program is free software; you can redistribute it and/or modify it +# under the terms of either the GNU Lesser General Public License Version 3 +# or the Perl Artistic License Version 2.0. +# SPDX-FileCopyrightText: 2026 Wilson Snyder # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap diff --git a/test_regress/t/t_fork_join_none_capture.py b/test_regress/t/t_fork_join_none_capture.py index eb19ddb94..6fe7d000c 100755 --- a/test_regress/t/t_fork_join_none_capture.py +++ b/test_regress/t/t_fork_join_none_capture.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2026 by Wilson Snyder. This program is free software; you -# can redistribute it and/or modify it under the terms of either the GNU -# Lesser General Public License Version 3 or the Perl Artistic License -# Version 2.0. +# This program is free software; you can redistribute it and/or modify it +# under the terms of either the GNU Lesser General Public License Version 3 +# or the Perl Artistic License Version 2.0. +# SPDX-FileCopyrightText: 2026 Wilson Snyder # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap diff --git a/test_regress/t/t_fork_join_none_inactive.py b/test_regress/t/t_fork_join_none_inactive.py index 25cf19acc..9aad707de 100755 --- a/test_regress/t/t_fork_join_none_inactive.py +++ b/test_regress/t/t_fork_join_none_inactive.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2026 by Wilson Snyder. This program is free software; you -# can redistribute it and/or modify it under the terms of either the GNU -# Lesser General Public License Version 3 or the Perl Artistic License -# Version 2.0. +# This program is free software; you can redistribute it and/or modify it +# under the terms of either the GNU Lesser General Public License Version 3 +# or the Perl Artistic License Version 2.0. +# SPDX-FileCopyrightText: 2026 Wilson Snyder # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap diff --git a/test_regress/t/t_fork_join_none_nested_triggered.py b/test_regress/t/t_fork_join_none_nested_triggered.py index eb19ddb94..6fe7d000c 100755 --- a/test_regress/t/t_fork_join_none_nested_triggered.py +++ b/test_regress/t/t_fork_join_none_nested_triggered.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2026 by Wilson Snyder. This program is free software; you -# can redistribute it and/or modify it under the terms of either the GNU -# Lesser General Public License Version 3 or the Perl Artistic License -# Version 2.0. +# This program is free software; you can redistribute it and/or modify it +# under the terms of either the GNU Lesser General Public License Version 3 +# or the Perl Artistic License Version 2.0. +# SPDX-FileCopyrightText: 2026 Wilson Snyder # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap diff --git a/test_regress/t/t_fork_join_none_waiters.py b/test_regress/t/t_fork_join_none_waiters.py index eb19ddb94..6fe7d000c 100755 --- a/test_regress/t/t_fork_join_none_waiters.py +++ b/test_regress/t/t_fork_join_none_waiters.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2026 by Wilson Snyder. This program is free software; you -# can redistribute it and/or modify it under the terms of either the GNU -# Lesser General Public License Version 3 or the Perl Artistic License -# Version 2.0. +# This program is free software; you can redistribute it and/or modify it +# under the terms of either the GNU Lesser General Public License Version 3 +# or the Perl Artistic License Version 2.0. +# SPDX-FileCopyrightText: 2026 Wilson Snyder # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap diff --git a/test_regress/t/t_timing_eval_act.py b/test_regress/t/t_timing_eval_act.py index 810ff85dd..787745ab3 100755 --- a/test_regress/t/t_timing_eval_act.py +++ b/test_regress/t/t_timing_eval_act.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2026 by Wilson Snyder. This program is free software; you -# can redistribute it and/or modify it under the terms of either the GNU -# Lesser General Public License Version 3 or the Perl Artistic License -# Version 2.0. +# This program is free software; you can redistribute it and/or modify it +# under the terms of either the GNU Lesser General Public License Version 3 +# or the Perl Artistic License Version 2.0. +# SPDX-FileCopyrightText: 2026 Wilson Snyder # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap diff --git a/test_regress/t/t_timing_fork_comb_bad.py b/test_regress/t/t_timing_fork_comb_bad.py index 1b5d6f77c..896c0f0dc 100755 --- a/test_regress/t/t_timing_fork_comb_bad.py +++ b/test_regress/t/t_timing_fork_comb_bad.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2024 by Wilson Snyder. This program is free software; you -# can redistribute it and/or modify it under the terms of either the GNU -# Lesser General Public License Version 3 or the Perl Artistic License -# Version 2.0. +# This program is free software; you can redistribute it and/or modify it +# under the terms of either the GNU Lesser General Public License Version 3 +# or the Perl Artistic License Version 2.0. +# SPDX-FileCopyrightText: 2024 Wilson Snyder # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap diff --git a/test_regress/t/t_virtual_interface_only_with_assignw.py b/test_regress/t/t_virtual_interface_only_with_assignw.py index 3ae669156..46d1fe4c0 100755 --- a/test_regress/t/t_virtual_interface_only_with_assignw.py +++ b/test_regress/t/t_virtual_interface_only_with_assignw.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2026 by Wilson Snyder. This program is free software; you -# can redistribute it and/or modify it under the terms of either the GNU -# Lesser General Public License Version 3 or the Perl Artistic License -# Version 2.0. +# This program is free software; you can redistribute it and/or modify it +# under the terms of either the GNU Lesser General Public License Version 3 +# or the Perl Artistic License Version 2.0. +# SPDX-FileCopyrightText: 2026 Wilson Snyder # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap diff --git a/test_regress/t/t_x_rand_scoped_is_random.py b/test_regress/t/t_x_rand_scoped_is_random.py index a26508e96..4d5a57238 100755 --- a/test_regress/t/t_x_rand_scoped_is_random.py +++ b/test_regress/t/t_x_rand_scoped_is_random.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 # DESCRIPTION: Verilator: Verilog Test driver/expect definition # -# Copyright 2025 by Wilson Snyder. This program is free software; you -# can redistribute it and/or modify it under the terms of either the GNU -# Lesser General Public License Version 3 or the Perl Artistic License -# Version 2.0. +# This program is free software; you can redistribute it and/or modify it +# under the terms of either the GNU Lesser General Public License Version 3 +# or the Perl Artistic License Version 2.0. +# SPDX-FileCopyrightText: 2025 Wilson Snyder # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 import vltest_bootstrap