[Chore] (MG_Backend/DirectVulkan, MG_Benchmark, MG_Benchmark/Buffer, MG_Benchmark/Container, MG_Benchmark/Driver, MG_Benchmark/Program, MG_Benchmark/ShaderCache, MG_Benchmark/Transpile, MG_Gbm, MG_IntegrationTest, MG_IntegrationTest/Harness, MG_Test, MG_Test/Backend, MG_Test/BackendLoader, MG_Test/Buffer, MG_Test/EGLState, MG_Test/Framebuffer, MG_Test/Gbm, MG_Test/Pipe, MG_Test/Pipeline, MG_Test/Program, MG_Test/Purity, MG_Test/Query, MG_Test/SelfTest, MG_Test/ShaderTranspiler, MG_Test/State, MG_Test/Swapchain, MG_Test/Texture, MG_Test/Util, MG_Test/VertexArray, MG_Test/Wire, scripts, scripts/ci, tools/cts, tools/device_bench, tools/spikes, tools/trace_replay): extend license headers to shell, CMake, Java and GLSL

This commit is contained in:
2026-10-15 10:15:40 -04:00
parent b808b68fd2
commit 73d4511bc1
118 changed files with 941 additions and 5 deletions
+8
View File
@@ -1,4 +1,12 @@
#!/bin/bash
# MobileGL - scripts/ci/control_smoke_test.sh
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
# R-16 FOR THE CI NEGATIVE CONTROLS THEMSELVES: a control-run smoke test.
#
# BRIEF-P5 13 (R-16) says a negative control must assert its own failure reason and that every gate
+8
View File
@@ -1,4 +1,12 @@
#!/bin/bash
# MobileGL - scripts/ci/dualblock_negative_control.sh
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
# P5f (f1)'s NEGATIVE CONTROL (P5F-WIRE-COMPLETENESS.md §6): the dual-block rehearsal must be
# the thing the dual-block lane measures.
#
@@ -1,4 +1,12 @@
#!/bin/bash
# MobileGL - scripts/ci/redcheck_control_smoke_test.sh
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
# R-16's "I made it red once, by doing X" for scripts/ci/control_smoke_test.sh, mechanised so the
# claim can be re-checked rather than believed.
#
+8
View File
@@ -1,4 +1,12 @@
#!/bin/bash
# MobileGL - scripts/ci/retrace_drop_draw_control.sh
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
# EXIT GATE E2's PICTURE CONTROL: dropping the draws on the wire must redden this retrace, and
# it must be THIS control's red.
#
+8
View File
@@ -1,4 +1,12 @@
#!/bin/bash
# MobileGL - scripts/ci/retrace_transport_control.sh
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
# THE RETRACE-SPLIT LANE'S NEGATIVE CONTROL: a library WITHOUT A TRANSPORT must red this split retrace.
#
# P13 W2: the library is the push monolith without MG_Remote (the shape FCL embeds). Until W2 it was
+8
View File
@@ -1,4 +1,12 @@
#!/bin/bash
# MobileGL - scripts/ci/split_negative_controls.sh
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
# EXIT GATE E1's NEGATIVE CONTROL and EXIT GATE E3(a)'s.
#
# This file is the body of .github/workflows/test.yml's "Negative controls (barrier, map push)"
+8
View File
@@ -1,4 +1,12 @@
#!/bin/bash
# MobileGL - scripts/ci/testdata/split_private_log_smoke.sh
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
# Exercise E1's per-test boundary evidence and E3(a)'s private-file read (R-16).
set -euo pipefail
HERE="$(cd "$(dirname "$0")/.." && pwd)"
+8
View File
@@ -1,4 +1,12 @@
#!/bin/bash
# MobileGL - scripts/ci/testdata/stub_ctest.sh
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
# A stubbed `ctest` for scripts/ci/control_smoke_test.sh.
#
# Descended from the verification agent's stub (wave1-codex-verify.md 8, ~/w7/p5-verify-f8-stub/ctest),
+8
View File
@@ -1,4 +1,12 @@
#!/usr/bin/env bash
# MobileGL - scripts/format_code.sh
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
set -uo pipefail
if [ -t 1 ]; then
CYAN=$'\033[36m'
+8
View File
@@ -1,4 +1,12 @@
#!/usr/bin/env bash
# MobileGL - scripts/g7_negative_control.sh
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
# G7's negative control: break the pipeline/dynamic split on purpose and prove the
# setter-consistency test says so.
#
+8
View File
@@ -1,4 +1,12 @@
#!/usr/bin/env bash
# MobileGL - scripts/p3a_untouched_regions.sh
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
# G5's gate: "pool 与延迟释放原样搬" is LITERAL - ELEVEN functions in
# MobileGL/MG_Backend/DirectGLES/Managers.cpp are byte-identical after P3a.
#
@@ -1,4 +1,12 @@
#!/usr/bin/env bash
# MobileGL - scripts/p3a_vertex_input_negative_control.sh
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
# G7's negative control for P3a: drop one field from the vertex-input wire conversion on purpose
# and prove the emission-consistency suite says so, naming the field.
#
@@ -1,4 +1,12 @@
#!/usr/bin/env bash
# MobileGL - scripts/p4a_descriptor_negative_control.sh
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
# G7's negative controls for P4a: drop one field from each of two descriptor conversions on purpose
# and prove the emission-consistency suites say so, NAMING the field.
#
+8
View File
@@ -1,4 +1,12 @@
#!/usr/bin/env bash
# MobileGL - scripts/p4a_untouched_regions.sh
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
# G5's gate for P4a: the Espryt do-not-touch list is LITERAL - SEVENTEEN regions across THREE
# files stay byte-identical after P4a.
#
+6 -5
View File
@@ -12,8 +12,8 @@
python3 scripts/update-source-file-header.py FILE ... # only these files
python3 scripts/update-source-file-header.py --check # list what needs attention, exit 1 if anything does
Covered under MobileGL/, scripts/ and tools/: C, C++ and .inc files with // comments and Python
scripts with # comments.
Covered under MobileGL/, scripts/ and tools/: C, C++, .inc, Java, JavaScript modules and GLSL with
// comments; Python, shell, CMake modules and CMakeLists.txt with # comments.
An existing header is kept as written, since its copyright years belong to the file; only a first
line that names a different path is corrected. Generated files and files under another license are
left alone. Files with mixed line endings are reported, never rewritten.
@@ -36,8 +36,9 @@ HEADER = """{c} MobileGL - {path}
"""
OWN_SPDX = "SPDX-License-Identifier: LGPL-3.0-only"
DIRS = ("MobileGL/", "scripts/", "tools/")
SLASH_EXT = (".h", ".hpp", ".cpp", ".cc", ".c", ".inc")
HASH_EXT = (".py",)
SLASH_EXT = (".h", ".hpp", ".cpp", ".cc", ".c", ".inc", ".java", ".mjs",
".vert", ".frag", ".comp", ".geom", ".tesc", ".tese", ".glsl")
HASH_EXT = (".py", ".sh", ".cmake")
FOREIGN_LICENSE = re.compile(r"Apache License|Permission is hereby granted|MIT License|BSD License|"
r"Mozilla Public License|zlib License")
SPDX_RE = re.compile(r"SPDX-License-Identifier:\s*(\S+)")
@@ -57,7 +58,7 @@ def is_generated(path):
def comment_prefix(path):
if path.endswith(HASH_EXT):
if path.endswith(HASH_EXT) or os.path.basename(path) == "CMakeLists.txt":
return "#"
if path.endswith(SLASH_EXT):
return "//"