This is an automated email from the ASF dual-hosted git repository. sjanc pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git
commit 62e4b5659420067deb5c96def90ed3eb1a733115 Author: Szymon Janc <[email protected]> AuthorDate: Thu Oct 15 17:57:26 2026 +0200 newt: Replace ambiguous syscfg CI test with Go test The test built btshell with apache-mynewt-core and nimble cloned from GitHub, which requires network access and the ARM toolchain, only to check that two true conditions overriding the same setting are accepted if they set the same value and rejected otherwise. Check this with "newt target config show" on a small test project instead. Assisted-by: Claude:claude-opus-5-5 --- .github/targets/ambiguous_fail/pkg.yml | 5 -- .github/targets/ambiguous_fail/syscfg.yml | 10 ---- .github/targets/ambiguous_fail/target.yml | 3 - .github/targets/ambiguous_success/pkg.yml | 5 -- .github/targets/ambiguous_success/syscfg.yml | 10 ---- .github/targets/ambiguous_success/target.yml | 3 - .github/workflows/test_ambiguous_cfg.yml | 66 ---------------------- newt/syscfg_collision_test.go | 57 +++++++++++++++++++ newt/testdata/syscfg_collision/apps/app/pkg.yml | 24 ++++++++ newt/testdata/syscfg_collision/project.yml | 25 ++++++++ .../repos/apache-mynewt-core/compiler/sim/pkg.yml | 21 +++++++ .../repos/apache-mynewt-core/hw/bsp/sim/bsp.yml | 28 +++++++++ .../repos/apache-mynewt-core/hw/bsp/sim/pkg.yml | 21 +++++++ .../repos/apache-mynewt-core/repository.yml | 22 ++++++++ .../repos/apache-mynewt-core/sys/foo/pkg.yml | 24 ++++++++ .../repos/apache-mynewt-core/sys/foo/syscfg.yml | 29 ++++++++++ .../testdata/syscfg_collision/targets/fail/pkg.yml | 21 +++++++ .../syscfg_collision/targets/fail/syscfg.yml | 28 +++++++++ .../syscfg_collision/targets/fail/target.yml | 22 ++++++++ .../syscfg_collision/targets/success/pkg.yml | 21 +++++++ .../syscfg_collision/targets/success/syscfg.yml | 28 +++++++++ .../syscfg_collision/targets/success/target.yml | 22 ++++++++ 22 files changed, 393 insertions(+), 102 deletions(-) diff --git a/.github/targets/ambiguous_fail/pkg.yml b/.github/targets/ambiguous_fail/pkg.yml deleted file mode 100644 index dba5fd24..00000000 --- a/.github/targets/ambiguous_fail/pkg.yml +++ /dev/null @@ -1,5 +0,0 @@ -pkg.name: "targets/ambiguous_fail" -pkg.type: target -pkg.description: -pkg.author: -pkg.homepage: diff --git a/.github/targets/ambiguous_fail/syscfg.yml b/.github/targets/ambiguous_fail/syscfg.yml deleted file mode 100644 index 0ff26b6a..00000000 --- a/.github/targets/ambiguous_fail/syscfg.yml +++ /dev/null @@ -1,10 +0,0 @@ -syscfg.vals: - SHELL_PROMPT_MODULE: 1 - SHELL_TASK: 1 - -syscfg.vals.SHELL_PROMPT_MODULE: - CONSOLE_IMPLEMENTATION: stub - -# This should fail -syscfg.vals.SHELL_TASK: - CONSOLE_IMPLEMENTATION: full diff --git a/.github/targets/ambiguous_fail/target.yml b/.github/targets/ambiguous_fail/target.yml deleted file mode 100644 index 2d850208..00000000 --- a/.github/targets/ambiguous_fail/target.yml +++ /dev/null @@ -1,3 +0,0 @@ -target.app: "@apache-mynewt-nimble/apps/btshell" -target.bsp: "@apache-mynewt-core/hw/bsp/nordic_pca10056" -target.build_profile: optimized diff --git a/.github/targets/ambiguous_success/pkg.yml b/.github/targets/ambiguous_success/pkg.yml deleted file mode 100644 index f4f8c20d..00000000 --- a/.github/targets/ambiguous_success/pkg.yml +++ /dev/null @@ -1,5 +0,0 @@ -pkg.name: "targets/ambiguous_success" -pkg.type: target -pkg.description: -pkg.author: -pkg.homepage: diff --git a/.github/targets/ambiguous_success/syscfg.yml b/.github/targets/ambiguous_success/syscfg.yml deleted file mode 100644 index c9935d56..00000000 --- a/.github/targets/ambiguous_success/syscfg.yml +++ /dev/null @@ -1,10 +0,0 @@ -syscfg.vals: - SHELL_PROMPT_MODULE: 1 - SHELL_TASK: 1 - -syscfg.vals.SHELL_PROMPT_MODULE: - CONSOLE_IMPLEMENTATION: stub - -# This should not fail as it sets the same value as previous conditional config -syscfg.vals.SHELL_TASK: - CONSOLE_IMPLEMENTATION: stub diff --git a/.github/targets/ambiguous_success/target.yml b/.github/targets/ambiguous_success/target.yml deleted file mode 100644 index 2d850208..00000000 --- a/.github/targets/ambiguous_success/target.yml +++ /dev/null @@ -1,3 +0,0 @@ -target.app: "@apache-mynewt-nimble/apps/btshell" -target.bsp: "@apache-mynewt-core/hw/bsp/nordic_pca10056" -target.build_profile: optimized diff --git a/.github/workflows/test_ambiguous_cfg.yml b/.github/workflows/test_ambiguous_cfg.yml deleted file mode 100644 index 37282808..00000000 --- a/.github/workflows/test_ambiguous_cfg.yml +++ /dev/null @@ -1,66 +0,0 @@ -# -# 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. -# - -name: Test ambiguous config - -on: [push, pull_request] - -jobs: - test_ambiguous_cfg: - name: other - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v7 - - uses: actions/setup-go@v7 - with: - go-version: 'stable' - - uses: carlosperate/[email protected] - with: - release: '12.2.Rel1' - - name: Install Dependencies - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y gcc-multilib - - name: Build newt - working-directory: newt - shell: bash - run: | - go version - go build - echo ${GITHUB_WORKSPACE}/newt >> $GITHUB_PATH - - name: Test ambiguous cfg (success) - shell: bash - run: | - newt new project - cp -r .github/targets/ambiguous_success project/targets - cd project/ - newt upgrade -v - newt build ambiguous_success - - name: Test ambiguous cfg (fail) - shell: bash - run: | - cp -r .github/targets/ambiguous_fail project/targets - cd project/ - ! newt build ambiguous_fail &> tmp.txt - grep "Error: setting CONSOLE_IMPLEMENTATION collision - two conditions true:" tmp.txt -q diff --git a/newt/syscfg_collision_test.go b/newt/syscfg_collision_test.go new file mode 100644 index 00000000..fd1cc876 --- /dev/null +++ b/newt/syscfg_collision_test.go @@ -0,0 +1,57 @@ +/** + * 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. + */ + +package main + +import ( + "path/filepath" + "regexp" + "strings" + "testing" +) + +// Two true conditions overriding the same setting are allowed only if they +// set the same value. +func TestSyscfgCollision(t *testing.T) { + projDir := filepath.Join("testdata", "syscfg_collision") + + t.Run("success", func(t *testing.T) { + out := newtOutput(t, projDir, nil, "target", "config", "show", + "success") + + re := regexp.MustCompile(`Setting: FOO_IMPLEMENTATION\r?\n.*\r?\n` + + `.*Value: bar\r?\n`) + if !re.MatchString(out) { + t.Errorf("FOO_IMPLEMENTATION not set to bar\n%s", out) + } + }) + + t.Run("fail", func(t *testing.T) { + out, err := newtCombinedOutput(projDir, nil, "target", "config", + "show", "fail") + if err == nil { + t.Fatalf("newt target config show succeeded\n%s", out) + } + + msg := "setting FOO_IMPLEMENTATION collision - two conditions true:" + if !strings.Contains(out, msg) { + t.Errorf("missing collision error\n%s", out) + } + }) +} diff --git a/newt/testdata/syscfg_collision/apps/app/pkg.yml b/newt/testdata/syscfg_collision/apps/app/pkg.yml new file mode 100644 index 00000000..55bf224b --- /dev/null +++ b/newt/testdata/syscfg_collision/apps/app/pkg.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. +# + +pkg.name: apps/app +pkg.type: app + +pkg.deps: + - "@apache-mynewt-core/sys/foo" diff --git a/newt/testdata/syscfg_collision/project.yml b/newt/testdata/syscfg_collision/project.yml new file mode 100644 index 00000000..52bc2750 --- /dev/null +++ b/newt/testdata/syscfg_collision/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. +# + +project.name: "syscfg_collision" + +repository.apache-mynewt-core: + type: git + vers: 0.0.0 + url: 'https://dummy.invalid/apache-mynewt-core.git' diff --git a/newt/testdata/syscfg_collision/repos/apache-mynewt-core/compiler/sim/pkg.yml b/newt/testdata/syscfg_collision/repos/apache-mynewt-core/compiler/sim/pkg.yml new file mode 100644 index 00000000..2f624582 --- /dev/null +++ b/newt/testdata/syscfg_collision/repos/apache-mynewt-core/compiler/sim/pkg.yml @@ -0,0 +1,21 @@ +# +# 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. +# + +pkg.name: compiler/sim +pkg.type: compiler diff --git a/newt/testdata/syscfg_collision/repos/apache-mynewt-core/hw/bsp/sim/bsp.yml b/newt/testdata/syscfg_collision/repos/apache-mynewt-core/hw/bsp/sim/bsp.yml new file mode 100644 index 00000000..934c920b --- /dev/null +++ b/newt/testdata/syscfg_collision/repos/apache-mynewt-core/hw/bsp/sim/bsp.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. +# + +bsp.arch: sim +bsp.compiler: "@apache-mynewt-core/compiler/sim" + +bsp.flash_map: + areas: + FLASH_AREA_IMAGE_0: + device: 0 + offset: 0x00000000 + size: 64kB diff --git a/newt/testdata/syscfg_collision/repos/apache-mynewt-core/hw/bsp/sim/pkg.yml b/newt/testdata/syscfg_collision/repos/apache-mynewt-core/hw/bsp/sim/pkg.yml new file mode 100644 index 00000000..7eee233c --- /dev/null +++ b/newt/testdata/syscfg_collision/repos/apache-mynewt-core/hw/bsp/sim/pkg.yml @@ -0,0 +1,21 @@ +# +# 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. +# + +pkg.name: hw/bsp/sim +pkg.type: bsp diff --git a/newt/testdata/syscfg_collision/repos/apache-mynewt-core/repository.yml b/newt/testdata/syscfg_collision/repos/apache-mynewt-core/repository.yml new file mode 100644 index 00000000..aabf9b4b --- /dev/null +++ b/newt/testdata/syscfg_collision/repos/apache-mynewt-core/repository.yml @@ -0,0 +1,22 @@ +# +# 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. +# + +repo.name: apache-mynewt-core +repo.versions: + "0.0.0": "master" diff --git a/newt/testdata/syscfg_collision/repos/apache-mynewt-core/sys/foo/pkg.yml b/newt/testdata/syscfg_collision/repos/apache-mynewt-core/sys/foo/pkg.yml new file mode 100644 index 00000000..5c17e91b --- /dev/null +++ b/newt/testdata/syscfg_collision/repos/apache-mynewt-core/sys/foo/pkg.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. +# + +pkg.name: sys/foo +pkg.type: lib + +pkg.init: + foo_init: 100 diff --git a/newt/testdata/syscfg_collision/repos/apache-mynewt-core/sys/foo/syscfg.yml b/newt/testdata/syscfg_collision/repos/apache-mynewt-core/sys/foo/syscfg.yml new file mode 100644 index 00000000..da5e7442 --- /dev/null +++ b/newt/testdata/syscfg_collision/repos/apache-mynewt-core/sys/foo/syscfg.yml @@ -0,0 +1,29 @@ +# +# 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. +# + +syscfg.defs: + FOO_IMPLEMENTATION: + description: Implementation of foo. + value: none + FOO_COND_1: + description: First condition overriding FOO_IMPLEMENTATION. + value: 0 + FOO_COND_2: + description: Second condition overriding FOO_IMPLEMENTATION. + value: 0 diff --git a/newt/testdata/syscfg_collision/targets/fail/pkg.yml b/newt/testdata/syscfg_collision/targets/fail/pkg.yml new file mode 100644 index 00000000..718ad5cb --- /dev/null +++ b/newt/testdata/syscfg_collision/targets/fail/pkg.yml @@ -0,0 +1,21 @@ +# +# 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. +# + +pkg.name: targets/fail +pkg.type: target diff --git a/newt/testdata/syscfg_collision/targets/fail/syscfg.yml b/newt/testdata/syscfg_collision/targets/fail/syscfg.yml new file mode 100644 index 00000000..906e4fd6 --- /dev/null +++ b/newt/testdata/syscfg_collision/targets/fail/syscfg.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. +# + +# Both conditions are true and they set different values. +syscfg.vals: + FOO_COND_1: 1 + FOO_COND_2: 1 + +syscfg.vals.FOO_COND_1: + FOO_IMPLEMENTATION: bar +syscfg.vals.FOO_COND_2: + FOO_IMPLEMENTATION: baz diff --git a/newt/testdata/syscfg_collision/targets/fail/target.yml b/newt/testdata/syscfg_collision/targets/fail/target.yml new file mode 100644 index 00000000..96001dcf --- /dev/null +++ b/newt/testdata/syscfg_collision/targets/fail/target.yml @@ -0,0 +1,22 @@ +# +# 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. +# + +target.app: apps/app +target.bsp: "@apache-mynewt-core/hw/bsp/sim" +target.build_profile: default diff --git a/newt/testdata/syscfg_collision/targets/success/pkg.yml b/newt/testdata/syscfg_collision/targets/success/pkg.yml new file mode 100644 index 00000000..91cd5d41 --- /dev/null +++ b/newt/testdata/syscfg_collision/targets/success/pkg.yml @@ -0,0 +1,21 @@ +# +# 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. +# + +pkg.name: targets/success +pkg.type: target diff --git a/newt/testdata/syscfg_collision/targets/success/syscfg.yml b/newt/testdata/syscfg_collision/targets/success/syscfg.yml new file mode 100644 index 00000000..8e021c55 --- /dev/null +++ b/newt/testdata/syscfg_collision/targets/success/syscfg.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. +# + +# Both conditions are true, but they set the same value. +syscfg.vals: + FOO_COND_1: 1 + FOO_COND_2: 1 + +syscfg.vals.FOO_COND_1: + FOO_IMPLEMENTATION: bar +syscfg.vals.FOO_COND_2: + FOO_IMPLEMENTATION: bar diff --git a/newt/testdata/syscfg_collision/targets/success/target.yml b/newt/testdata/syscfg_collision/targets/success/target.yml new file mode 100644 index 00000000..96001dcf --- /dev/null +++ b/newt/testdata/syscfg_collision/targets/success/target.yml @@ -0,0 +1,22 @@ +# +# 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. +# + +target.app: apps/app +target.bsp: "@apache-mynewt-core/hw/bsp/sim" +target.build_profile: default
