我有一个在Android设备上运行自动化测试的Jenkins脚本,在设备上运行所有测试后我在gradle上出现问题
Received result Success[value=null] from daemon DaemonInfo{pid=9464, address=[fb8f1f37-27ab-4a23-b86a-197e77780d1c port:63054, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Idle, lastBusy=1493544371434, context=DefaultDaemonContext[uid=47529e23-e8b7-42cb-9131-ba2d54045035,javaHome=C:\Program Files\Java\jdk1.8.0_111,daemonRegistryDir=C:\Users\someuser\.gradle\daemon,pid=9464,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1255,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
Build step 'Invoke Gradle script' changed build result to FAILURE
Build step 'Invoke Gradle script' marked build as failure
An attempt to send an e-mail to empty list of recipients, ignored.
Notifying upstream projects of job completion
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILUR
当我从计算机本身运行测试时,测试成功通过了
编辑: 我遇到问题的gradle日志部分
15:33:09.270 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileHashes.bin (C:\Jenkins\workspace\xxxx-02-AutomationGradle\.gradle\3.1\taskArtifacts\fileHashes.bin)
15:33:09.270 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileSnapshots.bin (C:\Jenkins\workspace\xxxx-02-AutomationGradle\.gradle\3.1\taskArtifacts\fileSnapshots.bin)
15:33:09.271 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache taskArtifacts.bin (C:\Jenkins\workspace\xxxx-02-AutomationGradle\.gradle\3.1\taskArtifacts\taskArtifacts.bin)
15:33:09.271 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on task history cache (C:\Jenkins\workspace\xxxx-02-AutomationGradle\.gradle\3.1\taskArtifacts).
15:33:09.273 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-versions.bin (C:\Users\xx\.gradle\caches\modules-2\metadata-2.21\module-versions.bin)
15:33:09.273 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-metadata.bin (C:\Users\xx\.gradle\caches\modules-2\metadata-2.21\module-metadata.bin)
15:33:09.273 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache artifact-at-repository.bin (C:\Users\xx\.gradle\caches\modules-2\metadata-2.21\artifact-at-repository.bin)
15:33:09.273 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (C:\Users\xx\.gradle\caches\modules-2).
15:33:09.274 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
15:33:09.275 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
15:33:09.275 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory] Deleted 2 resolution results binary files in 0.001 secs
15:33:09.276 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache Plugin Resolution Cache (C:\Users\xx\.gradle\caches\3.1\plugin-resolution) was closed 0 times.
15:33:09.276 [DEBUG] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopping 0 compiler daemon(s).
15:33:09.276 [INFO] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopped 0 compiler daemon(s).
15:33:09.276 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on cache directory workerMain (C:\Users\xx\.gradle\caches\3.1\workerMain).
15:33:09.277 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache jars (C:\Users\xx\.gradle\caches\jars-1) was closed 0 times.
15:33:09.277 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache Generated Gradle JARs cache (C:\Users\xx\.gradle\caches\3.1\generated-gradle-jars) was closed 0 times.
15:33:09.277 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has finished executing the build.
15:33:09.486 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] daemon is running. Sleeping until state changes.
15:33:09.488 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] Command execution: finished waiting for DaemonCommandExecution[command = Build{id=aa7ffae6-dcc7-4e0d-bfcb-a062735331d0.1, currentDir=c:\jenkins\workspace\xxxx-02-AutomationGradle}, connection = org.gradle.launcher.daemon.server.DefaultDaemonConnection@ee70914]. Result org.gradle.launcher.daemon.server.DaemonStateCoordinator@522eb22b with state Busy
15:33:09.488 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] Command execution: completed DaemonCommandExecution[command = Build{id=aa7ffae6-dcc7-4e0d-bfcb-a062735331d0.1, currentDir=c:\jenkins\workspace\xxxx-02-AutomationGradle}, connection = org.gradle.launcher.daemon.server.DefaultDaemonConnection@ee70914]
15:33:09.488 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] updating lastActivityAt to 1493555589488
15:33:09.488 [INFO] [org.gradle.launcher.daemon.server.DaemonRegistryUpdater] Marking the daemon as idle, address: [2c920926-ad81-4560-8c7e-391126091221 port:51336, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]]
15:33:09.488 [DEBUG] [org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Marking busy by address: [2c920926-ad81-4560-8c7e-391126091221 port:51336, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]]
15:33:09.490 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on daemon addresses registry.
15:33:09.491 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
15:33:09.493 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
15:33:09.493 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] daemon is running. Sleeping until state changes.
15:33:09.494 [DEBUG] [org.gradle.launcher.daemon.server.exec.ReturnResult] Daemon is dispatching the build result: Success[value=null]
15:33:09.494 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 15: dispatching class org.gradle.launcher.daemon.protocol.Success
15:33:09.496 [DEBUG] [org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler] Finishing executing command: Build{id=aa7ffae6-dcc7-4e0d-bfcb-a062735331d0.1, currentDir=c:\jenkins\workspace\xxxx-02-AutomationGradle}
15:33:09.502 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 16: received class org.gradle.launcher.daemon.protocol.Finished
15:33:09.503 [DEBUG] [org.gradle.launcher.daemon.server.DefaultDaemonConnection] thread 16: Received non-IO message from client: org.gradle.launcher.daemon.protocol.Finished@644ca32d
15:33:09.503 [DEBUG] [org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler] Received finished message: org.gradle.launcher.daemon.protocol.Finished@644ca32d
15:33:09.503 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 15: stopping connection
15:33:09.503 [DEBUG] [org.gradle.internal.remote.internal.inet.SocketConnection] Discarding EOFException: java.io.EOFException
15:33:09.503 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 16: received null
15:33:09.504 [DEBUG] [org.gradle.launcher.daemon.server.DefaultDaemonConnection] thread 16: Received end-of-input from client.
15:33:09.504 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 15: stopping connection
15:33:14.020 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
15:33:14.021 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
15:33:14.022 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
15:33:14.023 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
15:33:14.026 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
15:33:14.027 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
答案 0 :(得分:0)
好的,我会解决自己的问题,mybe会帮助别人。 从某些原因我们关闭所有cmd的代码和gradle将此视为一个问题,因此我们更改为在此作业后用另一个作业关闭cmd