Commit Graph

19 Commits

Author SHA1 Message Date
jonahwilliams d4d3e3698c [dart:io] ensure Process.start throws with a stack trace
Change-Id: I8b5d585b10752a873632b3a7b9447214e2d38954
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179640
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
2021-01-16 01:36:02 +00:00
Jonas Termansen 3433d8cfc3 [nnbd] Migrate standalone/io to NNBD.
The tests are also now dartfmt.

Bug: https://github.com/dart-lang/sdk/issues/40040
Change-Id: I8dece8097b37b70d47a5374dae2f3fadb0fc4b90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134338
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-02-07 14:41:36 +00:00
Siva Annamalai bc4860b0cb Most VM specific tests in standalone have been moved to standalone_2 and are being run in the regular bot tests. These tests are for VM functionality like io, process API etc. and have no strong mode implications. Currently we are running these tests twice once from standalone and once from standalone_2.
This CL removes these redundant tests from the standalone directory.

Bug:
Change-Id: Ib0adfa67fffa4de486e847698e18353fb4dd8a46
Reviewed-on: https://dart-review.googlesource.com/18429
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-07 23:00:00 +00:00
William Hesse 7bf2788bcc Restore all deleted tests to tests/standalone from migration to standalone_2
We are no longer deleting tests from the Dart 1 test directories when we
add them to the _2 directories. This reverts the part of change
https://dart-review.googlesource.com/c/sdk/+/12240 that modifies
the tests/standlone directory.
Bug:
Change-Id: Ie26b185234d0d18736a2fa13b77c5fd42cbb7e92
Reviewed-on: https://dart-review.googlesource.com/12287
Reviewed-by: Morten Krogh-jespersen <mkroghj@google.com>
2017-10-09 10:46:55 +00:00
Siva Annamalai bd2a8e1d60 Reland migrate most of the tests in standalone to be strong mode clean and move them to standalone_2 directory.
Bug:
Change-Id: I4ca50f315361422db1d4356055862463bfe1d6f3
Reviewed-on: https://dart-review.googlesource.com/12240
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2017-10-07 01:29:36 +00:00
Siva Annamalai ff32187145 Revert "Migrate most of the tests in standalone to be strong mode clean and move"
This reverts commit c85563f582.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Migrate most of the tests in standalone to be strong mode clean and move
> them to standalone_2 directory.
> 
> Change-Id: I9887b8d6d4d86001e4660b400224b881205e6273
> Reviewed-on: https://dart-review.googlesource.com/6080
> Reviewed-by: Ben Konyi <bkonyi@google.com>

TBR=bkonyi@google.com,asiva@google.com

Change-Id: I3c7b6081f17fca45e7828603538f50d06417e2be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/12020
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2017-10-06 17:24:20 +00:00
Siva Annamalai c85563f582 Migrate most of the tests in standalone to be strong mode clean and move
them to standalone_2 directory.

Change-Id: I9887b8d6d4d86001e4660b400224b881205e6273
Reviewed-on: https://dart-review.googlesource.com/6080
Reviewed-by: Ben Konyi <bkonyi@google.com>
2017-10-06 17:07:34 +00:00
Jacob Richman 2dcd56ef43 Format all tests.
There are far too many files here to review everyone carefully.
Spot checking most of the diffs look good as test code is generally written
with less care than application code so lots of ugly formatting get through.
If people notice files where the automated formatting bothers them feel free
to comment indicating file names and I'll move spaces within comments to make
the formatting cleaner and use comments to force block formatting as I have
done for other case where formatting looked bad.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2771453003 .
2017-04-17 14:53:02 -07:00
Vyacheslav Egorov 5143f12685 Gardening: Fix standalone/io/process_start_exception_test.dart.
It assumed that an attempt to start a non-existent binary on POSIX always
results in ENOENT (2). However this is not true: we are using execvp(...)
which attempts to find binaries through PATH (as long as the given filename
does not contain `/`) if binary is not found anywhere in the PATH and
some folder in PATH is inaccessible then execvp(...) fails with EACCES (13).

This caused the test to fail on Android whenever PATH contained /sbin which
is inaccessible.

We fix the test by clearing PATH for child processes.

Fixes issue https://github.com/dart-lang/sdk/issues/28299

R=kustermann@google.com
BUG=https://github.com/dart-lang/sdk/issues/28299

Review-Url: https://codereview.chromium.org/2639043003 .
2017-01-18 13:23:31 +01:00
Vyacheslav Egorov fe47282e9b Gardening: Mark io/http_basic_test slow. Add debug prints into io/process_start_exception_test.
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2631223003 .
2017-01-16 18:50:02 +01:00
floitsch@google.com 5431a5af54 Remove AsyncError with Expando.
Review URL: https://codereview.chromium.org//14251006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21498 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 18:58:32 +00:00
floitsch@google.com 8fd6d0aafd Remove Expect from core library.
Committed: https://code.google.com/p/dart/source/detail?r=19755
Reverted: http://code.google.com/p/dart/source/detail?r=19756

Review URL: https://codereview.chromium.org//12212016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20996 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 19:43:16 +00:00
floitsch@google.com 5dc8107c53 Revert "Remove Expect from core library."
This reverts commit 19755.

Review URL: https://codereview.chromium.org//12743005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19756 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 03:19:07 +00:00
floitsch@google.com 12dbd2fd70 Remove Expect from core library.
Review URL: https://codereview.chromium.org//12212016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19755 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 02:40:37 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
whesse@google.com e128dd9f14 Remove old #import, #source, and #library syntax from tests/standalone.
BUG=dart:7066

Review URL: https://codereview.chromium.org//11570005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16106 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 13:06:04 +00:00
ager@google.com ff9e0f75fb Change Process.start to return a future that completes with a
Process object only when the process has been successfully started.

This is less error prone since you can use all the methods on a
Process object as soon as you can get your hands on it. Unfortunately,
this change leads to quite a few changes in test.dart. Some of those
changes will fix bugs as well. We used to have a problem with a
timeout that could fire just in between two steps in a chain of
commands that constitute one test run. This change should address
that issue as well.

BUG=dartbug.com/5305

Review URL: https://codereview.chromium.org//11091070

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13729 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-17 10:57:45 +00:00
ager@google.com 5fb75d3952 Change dart:io to use Future for one-shot operations.
This appears to be what a lot of our users are doing and it is the
style used in our other libraries.

Noteworthy changes:

- File and Directory objects are now immutable.

- Directory.list returns an active lister object.

- Write operations on files return futures and the
  onNoPendingWrites handler is gone. The same
  functionality is there by using 'then' on the
  future returned from the last write operation.

- Process starting is now done with static methods:
  -- Process.start yields an InteractiveProcess.
  -- Process.run yields a Future<ProcessResult>

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10392023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7529 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-11 06:09:42 +00:00
sigmund@google.com f8db005eb2 test rename overhaul: step 12 - standalone
Review URL: https://chromiumcodereview.appspot.com//10252020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7165 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-30 17:34:19 +00:00