Commit Graph

62 Commits

Author SHA1 Message Date
Eric Seidel
5e2bc90daf Make it possible to specify the saved path for trace --stop
@chinmaygarde
2015-12-03 14:44:59 -08:00
Eric Seidel
4eee2e4c1d Add support for passing --trace-startup on Android
iOS takes a different codepath and will need more work.

@chinmaygarde
2015-12-03 12:23:52 -08:00
Eric Seidel
5b2cc1ae67 Make trace --stop fail if the adb pull fails.
@chinmaygarde
2015-12-02 11:27:27 -08:00
Adam Barth
9662d49e12 Clean up code organization in flutter_tools
1) Moved basic utility code into base/ directory to make it clear which code
   doesn't depend on Flutter-specific knowldge.
2) Move the CommandRunner subclasses into a runner/ directory because these
   aren't commands themselves.
2015-11-28 21:16:55 -08:00
Devon Carew
e36b07f7b5 print logging timestamps to profile app launch 2015-11-25 12:47:25 -08:00
Adam Barth
860547c1d4 Add support for system-level routing
Now you can supply a route argument to flutter start:

  $ flutter start --route /foo

which will start the app at /foo instead of /.
2015-11-24 16:13:20 -08:00
Adam Barth
b0470e31fb Improve unauthorized regexp
Fixes https://github.com/flutter/flutter.github.io/issues/101
2015-11-23 19:09:43 -08:00
Jason Simmons
854db78466 Build APKs without a local copy of the engine sources 2015-11-20 16:22:18 -08:00
Eric Seidel
847df52860 Point to Github issues instead of flutter.io
Fixes #489.

@sethladd
2015-11-19 10:29:29 -08:00
Adam Barth
3027497f85 Handle adb error cases more gracefully
We now print a sensible message if we can't find `dart` or `adb`. Also, we
print a sensible message if the device isn't authorized.

Fixes #380
Fixes #358
2015-11-17 23:23:30 -08:00
Collin Jackson
8c195c074f Now that #371 is fixed, we no longer need to check logs for "sky" 2015-11-16 14:34:54 -08:00
Nathan Kerr
d36af446f2 Change Regex to correctly match against my device.
Since we don't care about the port, just allow any characters between the spaces after the device ID and the product.

Running Windows 10, running "adb devices -l" with my device attached to the computer gives:
FA34MW904146           device product:cm_m7 model:One device:m7

Which wasn't being matched correctly (no info on USB port).
2015-11-14 11:25:29 -08:00
Hixie
9c6e96a3e8 Remove constructor tear-offs
Some of our workflows have no way to silence analyzer warnings, and the
analyzer doesn't yet support constructor tear-offs, so pretend that we
can't use them for now.
2015-11-12 12:39:02 -08:00
Hixie
a0227cab15 flutter analyze command
Other changes in this patch:
- Make the 'flutter' tool say "Updating flutter tool..." when it calls
  pub get, to avoid confusion about what the pub get output is about.
- Make the bash flutter tool call pub get when the revision has
  changed. (This was already happening on Windows.)
- Fix a raft of bugs found by the analyzer.
- Fix some style nits in various bits of code that happened to be near
  things the analyzer noticed.
- Remove the logic in "flutter test" that would run "pub get", since
  upon further reflexion it was determined it didn't work anyway.
  We'll probably have to add better diagnostics here and say to run the
  updater script.
- Remove the native velocity tracker script, since it was testing code
  that has since been removed.

Notes on ignored warnings:
- We ignore warnings in any packages that are not in the Flutter repo or
  in the author's current directory.
- We ignore various irrelevant Strong Mode warnings. We still enable
  strong mode because even though it's not really relevant to our needs,
  it does (more or less accidentally) catch a few things that are
  helpful to us.
- We allow CONSTANTS_LIKE_THIS, since we get some of those from other
  platforms that we are copying for sanity and consistency.
- We allow one-member abstract classes since we have a number of them
  where it's perfectly reasonable.
- We unfortunately still ignore warnings in mojom.dart autogenerated
  files. We should really fix those but that's a separate patch.
- We verify the actual source file when we see the 'Name non-constant
  identifiers using lowerCamelCase.' lint, to allow one-letter variables
  that use capital letters (e.g. for physics expressions) and to allow
  multiple-underscore variable names.
- We ignore all errors on lines that contain the following magic
  incantation and a "#" character:
    // analyzer doesn't like constructor tear-offs
- For all remaining errors, if the line contains a comment of the form
    // analyzer says "..."
  ...then we ignore any errors that have that "..." string in them.
2015-11-12 12:23:29 -08:00
Devon Carew
0292180075 also listen for flutter in the adb logs 2015-11-11 21:12:14 -08:00
Devon Carew
3c943d79ec fix an issue parsing 'adb devices' output 2015-11-11 14:14:12 -08:00
Adam Barth
da0a12c611 Rename sky_tools to flutter_tools 2015-11-10 13:20:35 -08:00
Devon Carew
20c2aa1690 fix a ws issue in the sample app 2015-11-10 08:48:03 -08:00
Ian Hickson
3419068cb3 Port test logic to Dart. 2015-11-09 09:00:49 -08:00
Devon Carew
3b9862a52c support older android devices (>= 16) 2015-11-07 21:55:21 -08:00
Jeff R. Allen
c8c2d23f26 Avoid use of run-as
Issue #1988 results from run-as not working on some phones,
because of Android issue 58373.

This change removes the need for run-as for running
"flutter start". It is still needed for tracing.
2015-11-07 15:28:01 +06:00
Adam Barth
113500206a Remove the --http option 2015-11-06 20:17:24 -08:00
Jason Simmons
6e0b59fc09 Add a flag that selects which Android device ID is the target for Flutter commands 2015-11-05 15:53:32 -08:00
Adam Barth
297e9c33fa Support Jelly Bean 2015-11-04 08:57:33 -08:00
Devon Carew
7d0a298b0b start a daemon command
wrap up first daemon implementation
2015-11-03 15:58:02 -08:00
Devon Carew
5dc4a7cce4 abstract some OS operations 2015-11-02 13:07:56 -08:00
Adam Barth
94b472ff67 Add a --no-http flag to start command
This flag builds a local FLX file and pushes that to the device instead of
using an HTTP server.
2015-10-31 12:18:03 -07:00
Devon Carew
48c3d01587 fix the stop command 2015-10-30 13:54:39 -07:00
Todd Volkert
a57109beba Wait for sky server to start before starting device
Instead of just waiting for the sky server process to start
before we start the activity on the device, this causes us to
wait for the sky server to actually start listening on its port

Fixes #141
2015-10-29 14:19:15 -07:00
Devon Carew
678af9c045 fix some issues found by strong mode 2015-10-28 13:42:46 -07:00
Devon Carew
5dbeb8f018 fix tests on windows
remove a runInShell arg on windows when launching pub
2015-10-23 22:44:56 -07:00
Nathan Kerr
bfeaaa8fb7 Web paths should always replace \ with / 2015-10-23 14:04:09 -07:00
Nathan Kerr
54e45e2b56 Don't rely on external shasum program to calculate sum of the APK.
Windows has no direct way to kill a process based on port. Uses netstats and loops through the results to find the correct process to kill.

Also modify Process.run for the server to runInShell if on Windows.

Style nits.
2015-10-23 13:06:26 -07:00
Devon Carew
bb1da703a6 return exit codes on failures 2015-10-17 11:50:23 -07:00
Adam Barth
047038b95a Support non-rooted Android devices
Now we use a debuggable APK and chmod the installation directory to be world
readable/writable.

Fixes https://github.com/flutter/engine/issues/126
2015-10-14 13:57:55 -07:00
Adam Barth
9c4835100b Handle the case of a non-connected Android device better
Previous we dumped a stack trace. Now we produce a more sensible error.
2015-10-12 11:05:09 -07:00
Adam Barth
0e06feee01 Add some print statements to smooth first run
This patch adds a couple print statements to explain why the first run of
`flutter start` takes a while. (We need to download the APK and install it on
the device.)
2015-10-12 01:33:03 -07:00
Adam Barth
8df5e9f738 Polish up some error handling
This patch improves the error handling for several arbitrary issues I
encountered while experimenting with the tool this evening.
2015-10-12 00:55:13 -07:00
Adam Barth
bdd20661d7 Teach sky_tools about prebuilt artifacts
This patch makes `flutter start` work without a clone of the engine git
repository. Making this work pulled a relatively large refactor of how the
commands interact with application packages and devices. Now commands that want
to interact with application packages or devices inherit from a common base
class that holds stores of those objects as members.

In production, the commands download and connect to devices based on the build
configuration stored on the FlutterCommandRunner. In testing, these fields are
used to mock out the real application package and devices.
2015-10-12 00:03:55 -07:00
Ian Fischer
a6a3f212ee IOSSimulator implementation.
Also fixes some minor bugs with iOS and Android interactions.
2015-10-11 19:36:06 -07:00
Ian Fischer
ae32410995 Get iOS devices working on Mac if you specify sky-src-path. 2015-10-09 16:23:33 -07:00
Ian Fischer
f4ec459c23 Add support for log commands on iOS. 2015-10-08 15:10:25 -07:00
Ian Fischer
43aaf50e05 Merge pull request #78 from iansf/ios_start
Add implementation of start and stop commands for iOS.
2015-10-07 15:45:34 -07:00
Ian Fischer
844678ddce Add implementation of start and stop commands for iOS. 2015-10-07 15:44:02 -07:00
Ian Fischer
72cc4d6fde Don’t give a scary error about not being able to run on Android if there’s no Android device connected. 2015-10-07 15:29:13 -07:00
Ian Fischer
7990e874df Just log, don’t exit when the user is missing access to a command. Prevents inappropriately-failing tests. 2015-10-06 16:19:06 -07:00
Ian Fischer
12192d00c1 Beginning implementation of IOSDevice. Implements list and install.
Also update tests to be compatible with the presence of iOS and add tests for list and install.
2015-10-06 11:46:29 -07:00
Ian Fischer
d07ca92995 Basic sky_tools list command, Android implementation, and test. 2015-10-01 08:43:57 -07:00
Ian Fischer
b8085cd033 Add sky_tools trace command, Android implementation, and basic test. 2015-09-30 14:02:29 -07:00
Ian Fischer
00bed774ce Add listen command and basic test, and don’t do unnecessary repeated work when listening or poking the android server. 2015-09-29 17:10:47 -07:00