This is an automated email from the ASF dual-hosted git repository.

andrzej-kaczmarek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git

commit ac08d5bcdb52c158c6dbdff66914d66fe1ce5437
Author: Andrzej Kaczmarek <[email protected]>
AuthorDate: Sun Oct 18 19:59:00 2026 +0200

    newt: Test local.project.yml overrides in upgrade tests
    
    Add upgrade test projects using local.project.yml:
    - local-override: per-field override of repository settings,
    - local-overwrite-delete: OVERWRITE and DELETE of repositories,
    - local-allowed: REMOVE and append on project.repositories.allowed,
    - local-conflict: OVERWRITE combined with DELETE on the same key.
    
    The success tests fail without local.project.yml, and
    local-overwrite-delete also fails if OVERWRITE is changed to a plain
    merge.
    
    Assisted-by: Claude:claude-opus-5-5
---
 .../upgrade/fail/local-conflict/expected.txt       |  1 +
 .../upgrade/fail/local-conflict/local.project.yml  | 25 ++++++++++++++++
 .../upgrade/fail/local-conflict/project.yml        | 28 ++++++++++++++++++
 .../upgrade/success/local-allowed/expected.txt     |  3 ++
 .../success/local-allowed/local.project.yml        | 24 +++++++++++++++
 .../upgrade/success/local-allowed/project.yml      | 33 +++++++++++++++++++++
 .../upgrade/success/local-override/expected.txt    |  5 ++++
 .../success/local-override/local.project.yml       | 24 +++++++++++++++
 .../upgrade/success/local-override/project.yml     | 28 ++++++++++++++++++
 .../success/local-overwrite-delete/expected.txt    |  5 ++++
 .../local-overwrite-delete/local.project.yml       | 25 ++++++++++++++++
 .../success/local-overwrite-delete/project.yml     | 34 ++++++++++++++++++++++
 12 files changed, 235 insertions(+)

diff --git a/newt/testdata/upgrade/fail/local-conflict/expected.txt 
b/newt/testdata/upgrade/fail/local-conflict/expected.txt
new file mode 100644
index 00000000..eb6b6cd5
--- /dev/null
+++ b/newt/testdata/upgrade/fail/local-conflict/expected.txt
@@ -0,0 +1 @@
+Error: local.project.yml: "repository.mynewt-dummy-repo-01.DELETE" can't be 
combined with other operations on the same key
diff --git a/newt/testdata/upgrade/fail/local-conflict/local.project.yml 
b/newt/testdata/upgrade/fail/local-conflict/local.project.yml
new file mode 100644
index 00000000..469ee969
--- /dev/null
+++ b/newt/testdata/upgrade/fail/local-conflict/local.project.yml
@@ -0,0 +1,25 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+repository.mynewt-dummy-repo-01.OVERWRITE:
+   type: git
+   vers: 0.0.0
+   url: 'https://dummy.invalid/mynewt-dummy-repo-01.git'
+
+repository.mynewt-dummy-repo-01.DELETE: true
diff --git a/newt/testdata/upgrade/fail/local-conflict/project.yml 
b/newt/testdata/upgrade/fail/local-conflict/project.yml
new file mode 100644
index 00000000..585a3bcd
--- /dev/null
+++ b/newt/testdata/upgrade/fail/local-conflict/project.yml
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+repository.mynewt-dummy-repo-01:
+   type: git
+   vers: 0.0.0
+   url: 'https://dummy.invalid/mynewt-dummy-repo-01.git'
+
+repository.mynewt-dummy-repo-05:
+   type: git
+   vers: 0.0.0
+   url: 'https://dummy.invalid/mynewt-dummy-repo-05.git'
diff --git a/newt/testdata/upgrade/success/local-allowed/expected.txt 
b/newt/testdata/upgrade/success/local-allowed/expected.txt
new file mode 100644
index 00000000..c07e942c
--- /dev/null
+++ b/newt/testdata/upgrade/success/local-allowed/expected.txt
@@ -0,0 +1,3 @@
+    * mynewt-dummy-repo-01: 1eee4918e0d207637cd91d9b4d851c4250041b06, 0.0.0
+    * mynewt-dummy-repo-03: 704f878403c920cc0d303452d04c13b98632b829, 2.0.1 
(rc)
+    * mynewt-dummy-repo-05: 59a441a8d183bab2f0f5bb5c3306462c9ddf86cd, 0.0.0
diff --git a/newt/testdata/upgrade/success/local-allowed/local.project.yml 
b/newt/testdata/upgrade/success/local-allowed/local.project.yml
new file mode 100644
index 00000000..d7e1c2c6
--- /dev/null
+++ b/newt/testdata/upgrade/success/local-allowed/local.project.yml
@@ -0,0 +1,24 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+project.repositories.allowed.REMOVE:
+   - mynewt-dummy-repo-02
+
+project.repositories.allowed:
+   - mynewt-dummy-repo-03
diff --git a/newt/testdata/upgrade/success/local-allowed/project.yml 
b/newt/testdata/upgrade/success/local-allowed/project.yml
new file mode 100644
index 00000000..d4a48737
--- /dev/null
+++ b/newt/testdata/upgrade/success/local-allowed/project.yml
@@ -0,0 +1,33 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+repository.mynewt-dummy-repo-01:
+   type: git
+   vers: 0.0.0
+   url: 'https://dummy.invalid/mynewt-dummy-repo-01.git'
+
+repository.mynewt-dummy-repo-05:
+   type: git
+   vers: 0.0.0
+   url: 'https://dummy.invalid/mynewt-dummy-repo-05.git'
+
+project.repositories.allowed:
+   - mynewt-dummy-repo-01
+   - mynewt-dummy-repo-02
+   - mynewt-dummy-repo-05
diff --git a/newt/testdata/upgrade/success/local-override/expected.txt 
b/newt/testdata/upgrade/success/local-override/expected.txt
new file mode 100644
index 00000000..f00a927c
--- /dev/null
+++ b/newt/testdata/upgrade/success/local-override/expected.txt
@@ -0,0 +1,5 @@
+    * mynewt-dummy-repo-01: fff3b9949b3cfcb3b56acfcdb05a41e78a39efdf
+    * mynewt-dummy-repo-02: 49ecae928798b33604922f912234c8d356efb1d4, 2.0.1 
(rc)
+    * mynewt-dummy-repo-03: 704f878403c920cc0d303452d04c13b98632b829, 2.0.1 
(rc)
+    * mynewt-dummy-repo-04: 503782e265da53629ed26af485d01a3b7ac80cbd, 0.0.0
+    * mynewt-dummy-repo-05: ea8ffb94ad4ddb39c5179924316f0ebef1e2c90f
diff --git a/newt/testdata/upgrade/success/local-override/local.project.yml 
b/newt/testdata/upgrade/success/local-override/local.project.yml
new file mode 100644
index 00000000..cdd95fd4
--- /dev/null
+++ b/newt/testdata/upgrade/success/local-override/local.project.yml
@@ -0,0 +1,24 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+repository.mynewt-dummy-repo-01:
+   vers: mybranch-commit
+
+repository.mynewt-dummy-repo-05:
+   vers: mybranch-commit
diff --git a/newt/testdata/upgrade/success/local-override/project.yml 
b/newt/testdata/upgrade/success/local-override/project.yml
new file mode 100644
index 00000000..585a3bcd
--- /dev/null
+++ b/newt/testdata/upgrade/success/local-override/project.yml
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+repository.mynewt-dummy-repo-01:
+   type: git
+   vers: 0.0.0
+   url: 'https://dummy.invalid/mynewt-dummy-repo-01.git'
+
+repository.mynewt-dummy-repo-05:
+   type: git
+   vers: 0.0.0
+   url: 'https://dummy.invalid/mynewt-dummy-repo-05.git'
diff --git a/newt/testdata/upgrade/success/local-overwrite-delete/expected.txt 
b/newt/testdata/upgrade/success/local-overwrite-delete/expected.txt
new file mode 100644
index 00000000..8e754afe
--- /dev/null
+++ b/newt/testdata/upgrade/success/local-overwrite-delete/expected.txt
@@ -0,0 +1,5 @@
+    * mynewt-dummy-repo-01: 1eee4918e0d207637cd91d9b4d851c4250041b06, 0.0.0
+    * mynewt-dummy-repo-02: 49ecae928798b33604922f912234c8d356efb1d4, 2.0.1 
(rc)
+    * mynewt-dummy-repo-03: 704f878403c920cc0d303452d04c13b98632b829, 2.0.1 
(rc)
+    * mynewt-dummy-repo-04: 503782e265da53629ed26af485d01a3b7ac80cbd, 0.0.0
+    * mynewt-dummy-repo-05: 59a441a8d183bab2f0f5bb5c3306462c9ddf86cd, 0.0.0
diff --git 
a/newt/testdata/upgrade/success/local-overwrite-delete/local.project.yml 
b/newt/testdata/upgrade/success/local-overwrite-delete/local.project.yml
new file mode 100644
index 00000000..437892d3
--- /dev/null
+++ b/newt/testdata/upgrade/success/local-overwrite-delete/local.project.yml
@@ -0,0 +1,25 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+repository.mynewt-dummy-repo-01.OVERWRITE:
+   type: git
+   vers: 0.0.0
+   url: 'https://dummy.invalid/mynewt-dummy-repo-01.git'
+
+repository.mynewt-dummy-repo-nonexistent.DELETE: true
diff --git a/newt/testdata/upgrade/success/local-overwrite-delete/project.yml 
b/newt/testdata/upgrade/success/local-overwrite-delete/project.yml
new file mode 100644
index 00000000..fa6ac924
--- /dev/null
+++ b/newt/testdata/upgrade/success/local-overwrite-delete/project.yml
@@ -0,0 +1,34 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+repository.mynewt-dummy-repo-01:
+   type: git
+   vers: 0.0.0
+   url: 'https://dummy.invalid/mynewt-dummy-repo-nonexistent.git'
+   branch: nonexistent-branch
+
+repository.mynewt-dummy-repo-05:
+   type: git
+   vers: 0.0.0
+   url: 'https://dummy.invalid/mynewt-dummy-repo-05.git'
+
+repository.mynewt-dummy-repo-nonexistent:
+   type: git
+   vers: 0.0.0
+   url: 'https://dummy.invalid/mynewt-dummy-repo-nonexistent.git'

Reply via email to