Commit Graph

132 Commits

Author SHA1 Message Date
Ian Hickson
f92f71feb9 Lock flutter tool while updating artifacts (#4476)
This prevents multiple simultaneous runs of the analyzer from stomping
over each other (e.g. multiple runs of 'update-packages'). Certain
long-lived commands (like analyze, run, logs) are exempted once they've
done enough work to be safe from most stomping action.

This still doesn't make us entirely safe from craziness, e.g. if you're
half way through an 'update-packages' run and you call 'git pull', who
knows what state you'll end up in. But there's only so much one can do.

Fixes https://github.com/flutter/flutter/issues/2762
2016-06-14 10:16:08 -07:00
Ian Hickson
c9bcf1074e Analyzer was confused when you deleted files (#4528)
Also, make it clear the screen between results so it's more obvious
what's going on when you have new results (especially when you have
fixed everything).
2016-06-13 12:20:03 -07:00
Devon Carew
3ba17136b7 add a restart command to the daemon protocol (#4385)
* refactor the --resident run option into a separate file

* update daemon to run --resident apps

* re-plumbing daemon start

* send app logs

* update tests

* review changes

* fix test runner

* remove PackageMap.createGlobalInstance; rely on the ctor

* review comments
2016-06-07 12:13:35 -07:00
Eric Seidel
880f2f785e flutter test now works on mac as well as linux
@chinmaygarde
2016-05-19 13:10:15 -07:00
Ian Hickson
f284c1a049 Fix tests (#3977)
Also, make sure that broken tests actually break the bots.

And add a test to make sure that keeps happening.
2016-05-17 12:45:37 -07:00
Jason Simmons
a590ee2671 Remove BuildConfigurations (#3879)
Artifacts from local engine builds will be found based on the --local-engine flag
2016-05-12 12:22:15 -07:00
Yegor
39e741dfb7 [tools] remove --flutter-repo flag in flutter test (#3728) 2016-05-04 14:08:16 -07:00
Devon Carew
29fdc7a464 rename the --release and --debug flags (#3382) 2016-04-18 13:04:59 -07:00
Devon Carew
b172dd5a1a run pub for analyze and test (#3310)
* run pub for analyze and test

* don't run pub when doing repo analysis

* move logic for when to run pub into the commands

* re-write ternary expression
2016-04-13 19:55:28 -07:00
Adam Barth
2e062dfab4 Use --packages rather than --package-root
The .packages file is replacing the packages directory of symlinks.
2016-03-28 15:01:25 -07:00
Devon Carew
2fc8e9a110 create a crash report 2016-03-25 13:29:15 -07:00
Hixie
797e27edd3 Add @override annotations to flutter framework 2016-03-14 14:02:26 -07:00
Devon Carew
e939b152af rename the platform constants 2016-03-12 11:08:21 -08:00
Ian Hickson
1b9cd52081 Enable ALL THE LINTS
Well, all the easy ones, anyway.

For some reason `// ignore:` isn't working for me so I've disabled
lints that need that. Also disabled those that require a ton of work
(which I'm doing, but not in this PR, to keep it reviewable).

This adds:
- avoid_init_to_null
- library_names
- package_api_docs
- package_names
- package_prefixed_library_names
- prefer_is_not_empty
- sort_constructors_first
- sort_unnamed_constructors_first
- unnecessary_getters_setters
2016-03-10 23:15:31 -08:00
Adam Barth
96ec5316b8 Switch from hack_load_vm_file_hook to PlatformPlugin
This patch switches us from using our previous hacking approach to integrating
with package:test to using the new PlatformPlugin interface.
2016-03-03 11:23:36 -08:00
Devon Carew
37290d866e additional validation for device commands 2016-02-24 11:11:23 -08:00
Devon Carew
d5a6fceee5 add a summary option to the doctor class 2016-02-17 09:33:45 -08:00
Devon Carew
cc72bbc7ec rename list->devices, start->run 2016-02-13 23:50:20 -08:00
Devon Carew
2dbceafbc6 introduce globals scoped to the app's context 2016-02-09 22:03:13 -08:00
Collin Jackson
beaffecb7b fix #1443 ensure engine is the correct version 2016-02-01 13:11:30 -08:00
Devon Carew
c46ad29cfb test commands checks for test fir 2016-01-28 15:02:50 -08:00
Devon Carew
d7fbf5302d use status(), error(), and trace() for logging
rename to printTrace(), printStatus(), and printError()
2016-01-28 12:44:17 -08:00
Ian Hickson
7151fdd054 Move flutter tests from packages/unit to packages/flutter/test 2015-12-16 08:00:57 -08:00
Adam Barth
fb98a387aa Support flutter test with prebuilt binaries
Now you can run tests with and without --flutter-repo with a prebuilt binary on
Linux.

Fixes #307
2015-12-03 10:05:57 -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
Adam Barth
c7e00449a8 Make it possible to run tests outside the Flutter repo
This patch still requires a locally built engine. I'll remove the need for a
locally built engine in a future patch.

Fixes #278
2015-11-23 13:42:04 -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
Adam Barth
da0a12c611 Rename sky_tools to flutter_tools 2015-11-10 13:20:35 -08:00
Hixie
bd69e2c405 Run 'pub get' the first time the tests are run 2015-11-09 13:44:04 -08:00
Ian Hickson
3419068cb3 Port test logic to Dart. 2015-11-09 09:00:49 -08:00
Adam Barth
2ed113430a Add dev/run_tests
This script runs the Flutter unit tests. By default, the script assumes you
have compiled a SkyShell in an "engine/src" that's a peer to the "flutter"
directory.
2015-11-06 23:14:17 -08:00
Adam Barth
fc8cdf4daf Add a command for running unit tests 2015-11-04 23:43:15 -08:00