Git Product home page Git Product logo

Comments (7)

fredszaq avatar fredszaq commented on August 17, 2024

here is a partial fix #163

it will still recopy the resources each time but at least it will be at the same place and won't eat disk space

we could probably speed up things for the copy on the android device by checking if https://github.com/google/adb-sync or https://github.com/SelfAdjointOperator/better-adb-sync is is the path and use it for the copy if it is the case

from dinghy.

ZhaoXiangXML avatar ZhaoXiangXML commented on August 17, 2024

Is it possible to just copy resources once before the first test?

from dinghy.

fredszaq avatar fredszaq commented on August 17, 2024

Dinghy registers itself as a runner inside cargo, and cargo creates a new dinghy process when it needs to run something on the device, passing some info about the executable to run and the package it comes from that is not available inside the dinghy main program. We don't really have the knowledge of previous invocations dinghy as the runner inside the runner.

So short answer is is not that easy and would probably be quite error prone if we did.

For ssh devices we already leverage rsync for the sync of the resources it would sort of make sense too use the same sort of mecanism for android (hence adb-sync)

from dinghy.

ZhaoXiangXML avatar ZhaoXiangXML commented on August 17, 2024

Is it ok to split the process into two commands, one for copy all resources and one for copy binaries and run tests?

Something like:

cargo dinghy prepare
cargo dinghy test

from dinghy.

fredszaq avatar fredszaq commented on August 17, 2024

Ok so I looked a bit more into it, and in fact adb has a --sync option when using adb push that we are using. We however had a bug in the preparation of the bundle where test_data consisting of a single file didn't have metadata copied from the original file that prevented adb from seeing it as the same file. I fixed it in #163 could you test that it fixes things for you ?

use

$ git clone https://github.com/sonos/dinghy.git
$ git checkout use-package-name-instead-of-runnable-id-for-dinghy-dir
$ cargo install --path cargo-dinghy

to install the updated dinghy

from dinghy.

ZhaoXiangXML avatar ZhaoXiangXML commented on August 17, 2024

@fredszaq I tried the new version for Android and indeed it's faster.

The version from cargo install took 3.8 minutes for my tests and the branch version took 2.5.

Guess my bottleneck is the size of executables now.

I have no success with dinghy on iOS so far so I can't try it for iOS now.

Looking forward for it to be published.

Thanks.

from dinghy.

fredszaq avatar fredszaq commented on August 17, 2024

great news ! you can use the --strip dinghy argument to strip the executables before sending them to the device is you don't need debug symbols. I'm closing this, I have a few more things I want to add to the release that I'm working on this week but we'll probably cut one either end of this week or beginning of the next.

from dinghy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.