From 1157024b8ad793db15454048e47f22c61ea66248 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Wed, 10 May 2023 19:43:17 +0200 Subject: [PATCH] [Tizen] Fix build with non-default toolchain (#26475) * [Tizen] Fix build with non-default toolchain * Add toolchain to Tizen check target * Include Tizen check only if BLE is disabled --- BUILD.gn | 8 ++++++-- .../tizen/integration_tests/lighting-app/BUILD.gn | 4 ++-- third_party/tizen/tizen_sdk.gni | 14 +++++++------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index d9c68de527c0aa..dfe6cbbf4850f3 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -677,10 +677,14 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { if (enable_tizen_builds) { group("check:tizen") { testonly = true - deps = [ "${chip_root}/src/test_driver/tizen/integration-tests:check" ] + deps = [ "${chip_root}/src/test_driver/tizen:check(${chip_root}/build/toolchain/tizen:tizen_arm)" ] } - extra_check_deps += [ ":check:tizen" ] + # Include Tizen check target only if BLE is not enabled, since + # currently, QEMU-based Tizen does not support Bluetooth. + if (!chip_config_network_layer_ble) { + extra_check_deps += [ ":check:tizen" ] + } } if (enable_mw320_shell_build) { diff --git a/src/test_driver/tizen/integration_tests/lighting-app/BUILD.gn b/src/test_driver/tizen/integration_tests/lighting-app/BUILD.gn index 36fb2c340a23ec..612d1cfb0c7728 100644 --- a/src/test_driver/tizen/integration_tests/lighting-app/BUILD.gn +++ b/src/test_driver/tizen/integration_tests/lighting-app/BUILD.gn @@ -28,9 +28,9 @@ tizen_qemu_mkisofs("test-runner") { # Use artifacts created by the dependencies. assets = [ - rebase_path("${root_build_dir}/chip-tool"), + rebase_path("${root_out_dir}/chip-tool"), rebase_path( - "${root_build_dir}/org.tizen.matter.example.lighting/out/org.tizen.matter.example.lighting-1.0.0.tpk"), + "${root_out_dir}/org.tizen.matter.example.lighting/out/org.tizen.matter.example.lighting-1.0.0.tpk"), ] } diff --git a/third_party/tizen/tizen_sdk.gni b/third_party/tizen/tizen_sdk.gni index 32bb5539a483f6..70242ee1c3dbf6 100644 --- a/third_party/tizen/tizen_sdk.gni +++ b/third_party/tizen/tizen_sdk.gni @@ -82,7 +82,7 @@ template("tizen_sdk_certificate") { assert(defined(invoker.sign_security_profile), "It is required to specify a `sign_security_profile` which " + "should be added to Tizen security profiles.") - stamp_file = "${root_build_dir}/.tizen_sdk_dev_certificate_stamp" + stamp_file = "${root_out_dir}/.tizen_sdk_dev_certificate_stamp" action(target_name) { forward_variables_from(invoker, [ "deps" ]) script = tizen_dev_certificate @@ -91,7 +91,7 @@ template("tizen_sdk_certificate") { "--author-certificate-email=" + invoker.author_certificate_email, "--author-certificate-password=" + invoker.author_certificate_password, "--sign-security-profile=" + invoker.sign_security_profile, - "--stamp-file=" + stamp_file, + "--stamp-file=" + rebase_path(stamp_file), ] outputs = [ stamp_file ] } @@ -112,7 +112,7 @@ template("tizen_sdk_package") { # Extract data from Tizen XML manifest. manifest = exec_script(tizen_manifest_parser, - [ rebase_path(invoker.manifest, root_build_dir) ], + [ rebase_path(invoker.manifest) ], "json") manifest_package = manifest["package"] manifest_package_name = manifest_package["name"] @@ -123,7 +123,7 @@ template("tizen_sdk_package") { # for this, because Tizen Studio CLI scans "res" (resources), "shared" and # "lib" directories for items to pack. In our case it could include in the # TPK package libraries available in ${root_out_dir}/lib directory. - tizen_package_dir = "${root_build_dir}/${manifest_package_name}" + tizen_package_dir = "${root_out_dir}/${manifest_package_name}" tizen_package_out_dir = "${tizen_package_dir}/out" # Copy Tizen manifest from the source directory. @@ -160,7 +160,7 @@ template("tizen_sdk_package") { "--sign", invoker.sign_security_profile, "--", - tizen_package_out_dir, + rebase_path(tizen_package_out_dir), ] } } @@ -192,7 +192,7 @@ template("tizen_qemu_mkisofs") { "-JRU", # Joliet + Rock Ridge with untranslated filenames "-o", rebase_path(image_file), - rebase_path(invoker.runner, root_build_dir), + rebase_path(invoker.runner), ] if (defined(invoker.assets)) { args += invoker.assets @@ -216,7 +216,7 @@ template("tizen_qemu_run") { "It is required to specify ISO runner image.") # Store QEMU output in a dedicated log file. - output_log_file = "${root_build_dir}/tizen-qemu-" + target_name + ".log" + output_log_file = "${root_out_dir}/tizen-qemu-" + target_name + ".log" action(target_name) { forward_variables_from(invoker, [ "deps" ])