android - Flank Bitrise 步骤失败,因为它找不到结果目录

标签 android go bitrise

我正在尝试让 Flank Bitrise 步骤起作用,但是在运行所有测试后它在最后失败了,错误为 Failed to export artifacts, error: open ./results: no such file or directory

我已经尝试调查步骤中的 Go 代码(位于 here)以尝试了解应该在何处创建目录,但我一直无法弄清楚。

如果我在本地运行 Flank,一切都运行良好。

这是该步骤的完整输出:

------------------------------------------------------------------------------+

| (4) flank@0.1.0                                                              |
+------------------------------------------------------------------------------+
| id: flank                                                                    |
| version: 0.1.0                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2019-08-07T01:57:04Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
Config:
- ServiceAccountJSON: *****
- ConfigPath: android/flank.yml
- Version: latest
- CommandFlags: 
Downloading binary
- Done
Running test
- Detected platform: android
$ java "-jar" "/tmp/flank-bin214923599/flank.jar" "android" "run" "-c" "android/flank.yml"
AndroidArgs
    gcloud:
      results-bucket: test-lab-c3at6r97r91bu-jwmcsninvtajk
      results-dir: null
      record-video: true
      timeout: 15m
      async: false
      results-history-name: null
      # Android gcloud
      app: /bitrise/deploy/app-debug.apk
      test: /bitrise/deploy/app-debug-androidTest.apk
      auto-google-login: true
      use-orchestrator: true
      directories-to-pull:
      performance-metrics: true
      test-runner-class: null
      test-targets:
      device:
        - model: Nexus5X
          version: 26
          locale: en
          orientation: portrait
      flaky-test-attempts: 0
    flank:
      max-test-shards: 4
      shard-time: -1
      repeat-tests: 1
      smart-flank-gcs-path: 
      smart-flank-disable-upload: false
      files-to-download:
      test-targets-always-run:
      disable-sharding: false
      project: android-app-248901
      local-result-dir: flank
      # Android Flank Yml
      additional-app-test-apks:
RunTests
  Uploading app-debug-androidTest.apk .  Uploading app-debug.apk .
  Smart Flank cache hit: 0% (0 / 33)
  Shard times: 80s, 80s, 80s, 90s
  33 tests / 4 shards
  4 matrix ids created in 0m 3s
  https://console.developers.google.com/storage/browser/test-lab-c3at6r97r91bu-jwmcsninvtajk/2019-08-07_01-57-10.546000_hAvO/
PollMatrices
  0m  0s matrix-q7z6s7e7ji13a Nexus5X-26 VALIDATING
  0m 15s matrix-q7z6s7e7ji13a Nexus5X-26 PENDING
  0m 45s matrix-q7z6s7e7ji13a Nexus5X-26 Starting attempt 1.
  0m 45s matrix-q7z6s7e7ji13a Nexus5X-26 RUNNING
  1m 45s matrix-q7z6s7e7ji13a Nexus5X-26 Started logcat recording.
  1m 45s matrix-q7z6s7e7ji13a Nexus5X-26 Preparing device.
  2m 15s matrix-q7z6s7e7ji13a Nexus5X-26 Logging in to Google account on device.
  2m 15s matrix-q7z6s7e7ji13a Nexus5X-26 Installing apps.
  2m 30s matrix-q7z6s7e7ji13a Nexus5X-26 Retrieving Pre-Test Package Stats information from the device.
  2m 30s matrix-q7z6s7e7ji13a Nexus5X-26 Retrieving Performance Environment information from the device.
  2m 30s matrix-q7z6s7e7ji13a Nexus5X-26 Started crash detection.
  2m 30s matrix-q7z6s7e7ji13a Nexus5X-26 Started crash monitoring.
  2m 30s matrix-q7z6s7e7ji13a Nexus5X-26 Started performance monitoring.
  2m 45s matrix-q7z6s7e7ji13a Nexus5X-26 Started video recording.
  2m 45s matrix-q7z6s7e7ji13a Nexus5X-26 Starting instrumentation test.
  6m 31s matrix-q7z6s7e7ji13a Nexus5X-26 Completed instrumentation test.
  6m 46s matrix-q7z6s7e7ji13a Nexus5X-26 Stopped performance monitoring.
  7m 16s matrix-q7z6s7e7ji13a Nexus5X-26 Stopped crash monitoring.
  7m 16s matrix-q7z6s7e7ji13a Nexus5X-26 Retrieving Post-test Package Stats information from the device.
  7m 16s matrix-q7z6s7e7ji13a Nexus5X-26 Stopped logcat recording.
  7m 16s matrix-q7z6s7e7ji13a Nexus5X-26 Logging out of Google account on device.
  7m 16s matrix-q7z6s7e7ji13a Nexus5X-26 Done. Test time = 239 (secs)
  7m 16s matrix-q7z6s7e7ji13a Nexus5X-26 Starting results processing. Attempt: 1
  7m 31s matrix-q7z6s7e7ji13a Nexus5X-26 Completed results processing. Time taken = 12 (secs)
  7m 31s matrix-q7z6s7e7ji13a Nexus5X-26 FINISHED
  7m 31s matrix-q7z6s7e7ji13a FINISHED
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Starting attempt 1.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Started logcat recording.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Preparing device.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Logging in to Google account on device.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Installing apps.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Retrieving Pre-Test Package Stats information from the device.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Retrieving Performance Environment information from the device.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Started crash detection.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Started crash monitoring.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Started performance monitoring.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Started video recording.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Starting instrumentation test.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Completed instrumentation test.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Stopped performance monitoring.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Stopped crash monitoring.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Stopped logcat recording.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Retrieving Post-test Package Stats information from the device.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Logging out of Google account on device.
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Done. Test time = 249 (secs)
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Starting results processing. Attempt: 1
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 Completed results processing. Time taken = 11 (secs)
  7m 32s matrix-2ay0yj5na36d8 Nexus5X-26 FINISHED
  7m 32s matrix-2ay0yj5na36d8 FINISHED
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Starting attempt 1.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Started logcat recording.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Preparing device.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Logging in to Google account on device.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Installing apps.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Retrieving Pre-Test Package Stats information from the device.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Retrieving Performance Environment information from the device.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Started crash detection.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Started crash monitoring.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Started performance monitoring.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Started video recording.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Starting instrumentation test.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Completed instrumentation test.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Stopped performance monitoring.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Stopped crash monitoring.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Stopped logcat recording.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Retrieving Post-test Package Stats information from the device.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Logging out of Google account on device.
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Done. Test time = 248 (secs)
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 Starting results processing. Attempt: 1
  7m 32s matrix-83si0hz9imz4a Nexus5X-26 RUNNING
  7m 47s matrix-83si0hz9imz4a Nexus5X-26 Completed results processing. Time taken = 12 (secs)
  7m 47s matrix-83si0hz9imz4a Nexus5X-26 FINISHED
  7m 47s matrix-83si0hz9imz4a FINISHED
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Starting attempt 1.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Started logcat recording.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Preparing device.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Logging in to Google account on device.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Installing apps.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Retrieving Pre-Test Package Stats information from the device.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Retrieving Performance Environment information from the device.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Started crash detection.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Started performance monitoring.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Started crash monitoring.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Started video recording.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Starting instrumentation test.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Completed instrumentation test.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Stopped performance monitoring.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Stopped crash monitoring.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Retrieving Post-test Package Stats information from the device.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Stopped logcat recording.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Logging out of Google account on device.
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Done. Test time = 255 (secs)
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 Starting results processing. Attempt: 1
  7m 47s matrix-2cwsozznj0yn3 Nexus5X-26 RUNNING
  9m 17s matrix-2cwsozznj0yn3 Nexus5X-26 Completed results processing. Time taken = 105 (secs)
  9m 17s matrix-2cwsozznj0yn3 Nexus5X-26 FINISHED
  9m 17s matrix-2cwsozznj0yn3 FINISHED
FetchArtifacts
  ....
  Updating matrix file
CostReport
  Virtual devices
    $0.32 for 19m
MatrixResultsReport
  4 / 4 (100.00%)
Exporting artifacts
Failed to export artifacts, error: open ./results: no such file or directory
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | flank@0.1.0 (exit code: 1)                                    | 570 sec  |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-steplib/bitrise-step-flank/issues  |
| Source: https://github.com/bitrise-steplib/bitrise-step-flank                |
+---+---------------------------------------------------------------+----------+

最佳答案

啊,找到了。事实证明,您需要将 flank.yml 中的 local-results-dir 设置为 results 以匹配 Bitrise 步骤的预期。在 github 页面上的 flank.yml 中它默认为 'flank'

## Local folder to store the test result. Folder is DELETED before each run to ensure only artifacts from the new run are saved.
 local-result-dir: results

关于android - Flank Bitrise 步骤失败,因为它找不到结果目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57389940/

相关文章:

java - Android 库项目 JAR

string - 如何在go模板中移动 slice ?

go - 如果行不存在,QueryRow().Scan() 返回错误

ios - 未找到签名证书 “iOS Development” - 使用 bitrise/FaSTLane 匹配构建应用程序版本

android - Bitrise 默认环境变量

android - Video Intent 未将视频保存到所需位置

java - Android Fragment 在第二次单击选项卡之前不会加载数据

java - 除非重新启动应用程序,否则无法从 DAO 获取最新数据

go - 通过附加到golang中的现有 slice 来创建新 slice

Android 报告 "Error=Unable to find instrumentation info for: ComponentInfo {}"