chromium/tools/swarm_client.git
12 days agoFix cookie creation error on Windows. master
maruel@chromium.org [Thu, 6 Jun 2013 18:39:48 +0000 (18:39 +0000)]
Fix cookie creation error on Windows.

'~' was not expanded correctly, resulting in:
  ERROR    run_isolated(767): Failed to create ~\.isolated_cookies
  ERROR    run_isolated(771): Failed to fix mode for ~\.isolated_cookies

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@204542 0039d316-1c4b-4281-b951-d872f2087c98

12 days agoGive up path case verification on OSX.
maruel@chromium.org [Thu, 6 Jun 2013 15:58:59 +0000 (15:58 +0000)]
Give up path case verification on OSX.

There is an issue where the path case automagically changes on an incremental
build. It is breaking on isolate.py run -s foo.isolated when there is a bundle
mapped recursively.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@204510 0039d316-1c4b-4281-b951-d872f2087c98

12 days agoAdd information about the error encountered when failing to map.
maruel@chromium.org [Thu, 6 Jun 2013 14:06:44 +0000 (14:06 +0000)]
Add information about the error encountered when failing to map.

Create the log directory as needed when running Swarm tests on Swarm.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@204494 0039d316-1c4b-4281-b951-d872f2087c98

2 weeks agoFix a regression in r203768. os.O_DIRECTORY is not defined on Windows.
maruel@chromium.org [Tue, 4 Jun 2013 15:54:06 +0000 (15:54 +0000)]
Fix a regression in r203768. os.O_DIRECTORY is not defined on Windows.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@203972 0039d316-1c4b-4281-b951-d872f2087c98

2 weeks agoReduce reliance on RelativePath when not needed in strace log parsing code.
maruel@chromium.org [Mon, 3 Jun 2013 20:59:25 +0000 (20:59 +0000)]
Reduce reliance on RelativePath when not needed in strace log parsing code.

This reduces a lot late-binding.

Add getcwd() to improve correctness. It also fixes an issue in path handling
code with grand-children processes.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@203769 0039d316-1c4b-4281-b951-d872f2087c98

2 weeks agoDifferentiate between inputs, outputs and touched files on OSX and linux.
maruel@chromium.org [Mon, 3 Jun 2013 20:57:17 +0000 (20:57 +0000)]
Differentiate between inputs, outputs and touched files on OSX and linux.

It is not functional yet on Windows, and it's not guaranteed it's possible at
all so mark all the files as modified for now.

This is to eventually be able to trace meaningfully ninja, at least on OSX and
linux.

Fix a regression to run_isolated_smoke_test.py on Windows due to r203426.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@203768 0039d316-1c4b-4281-b951-d872f2087c98

2 weeks agoIncrease default level to warning; warn on low free space condition.
maruel@chromium.org [Fri, 31 May 2013 17:06:51 +0000 (17:06 +0000)]
Increase default level to warning; warn on low free space condition.

Increase default free disk space lower limit to 2gb. 1gb isn't that much, as a
single test run can download well over that.

This should help detect issues on the swarm bots.

Sadly, this feature is still untested and I added a TODO for a complete solution
that would make the slave never cross the free disk space policy boundary.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@203426 0039d316-1c4b-4281-b951-d872f2087c98

2 weeks agoFix isolate_test.py on OSX.
maruel@chromium.org [Fri, 31 May 2013 13:02:12 +0000 (13:02 +0000)]
Fix isolate_test.py on OSX.

It had been broken on OSX since r197097 but the test worked on linux even if the
path was wrong because on linux there's no work to do to find the native path
case, so the code never looks at the file system. On OSX, it has to look if the
files are there, and since the test was making an invalid tree for testing
purposes, the function call failed.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@203396 0039d316-1c4b-4281-b951-d872f2087c98

2 weeks agoRan sed -i s/assertEquals/assertEqual/g *.py on all tests.
maruel@chromium.org [Thu, 30 May 2013 20:40:13 +0000 (20:40 +0000)]
Ran sed -i s/assertEquals/assertEqual/g *.py on all tests.

It annoyed me.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@203212 0039d316-1c4b-4281-b951-d872f2087c98

2 weeks agoAdd self._scripts_to_cleanup to Tracer, as more scripts will be needed.
maruel@chromium.org [Wed, 29 May 2013 19:22:14 +0000 (19:22 +0000)]
Add self._scripts_to_cleanup to Tracer, as more scripts will be needed.

In practice, strace based tracing will soon require 2 temporary scripts, so
using a list makes automatic cleanup cleaner.

The reason to eventually use 2 temporary scripts is to comply with strict ptrace
rules in ubuntu with regards to process parentship:
https://wiki.ubuntu.com/Security/Features#ptrace

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@202932 0039d316-1c4b-4281-b951-d872f2087c98

2 weeks agoEnable strace using optionally sudo.
maruel@chromium.org [Wed, 29 May 2013 18:52:59 +0000 (18:52 +0000)]
Enable strace using optionally sudo.

With sudo usage, it is easiest (guaranteed) that the process can be attached,
so use an exec thunk to start the child process. This gives a deterministic
process tree that is easier to parse. Keep the non-sudo functionality which is
fine enough for the vast majority of cases.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@202923 0039d316-1c4b-4281-b951-d872f2087c98

3 weeks agoAdd fallocate() stub ignoring it.
maruel@chromium.org [Tue, 28 May 2013 19:45:49 +0000 (19:45 +0000)]
Add fallocate() stub ignoring it.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@202625 0039d316-1c4b-4281-b951-d872f2087c98

3 weeks agoAdd harvest_buildbot.py.
maruel@chromium.org [Tue, 28 May 2013 17:37:41 +0000 (17:37 +0000)]
Add harvest_buildbot.py.

Retrieve information through the buildbot json interface of the Chromium Try
Server to figure out if there is issues between buildbot and Swarm integration.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@202596 0039d316-1c4b-4281-b951-d872f2087c98

3 weeks agoReduce strace log sizes.
maruel@chromium.org [Tue, 28 May 2013 14:46:15 +0000 (14:46 +0000)]
Reduce strace log sizes.

Remove signals from the logs.
Reduce whitespace usage in trace lines.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@202563 0039d316-1c4b-4281-b951-d872f2087c98

3 weeks agoDo not run tests that touch live infrastructure on upload.
maruel@chromium.org [Tue, 28 May 2013 14:46:07 +0000 (14:46 +0000)]
Do not run tests that touch live infrastructure on upload.

It's annoying as hell when travelling. Just run them on commit.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@202562 0039d316-1c4b-4281-b951-d872f2087c98

3 weeks agoIgnore chown.
maruel@chromium.org [Tue, 28 May 2013 14:43:14 +0000 (14:43 +0000)]
Ignore chown.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@202560 0039d316-1c4b-4281-b951-d872f2087c98

3 weeks agoFix parsing of aggressive test case.
maruel@chromium.org [Fri, 24 May 2013 20:57:36 +0000 (20:57 +0000)]
Fix parsing of aggressive test case.

Some test case output fake success code to try to foul the parser. Nice try.
Work around them.

R=csharp@chromium.org
BUG=177163
BUG=243860

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@202164 0039d316-1c4b-4281-b951-d872f2087c98

3 weeks agoAdd a sleep when zip exceptions are encountered
csharp@chromium.org [Fri, 24 May 2013 20:48:48 +0000 (20:48 +0000)]
Add a sleep when zip exceptions are encountered

The zip expections are usually due to failing to download the full file,
and tests seem to show that this occurs when many machines are trying
to grab the same file at the same time, so try and stagger the downloads.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@202162 0039d316-1c4b-4281-b951-d872f2087c98

3 weeks agoAdd logging to download_file in run_isolated.py
csharp@chromium.org [Fri, 24 May 2013 17:56:56 +0000 (17:56 +0000)]
Add logging to download_file in run_isolated.py

This should help identify how often failures are occuring, as well as
some more details about the failure.

R=maruel@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@202125 0039d316-1c4b-4281-b951-d872f2087c98

3 weeks agoHave swarm_trigger_step fail when there's no trigger request.
maruel@chromium.org [Wed, 22 May 2013 19:18:30 +0000 (19:18 +0000)]
Have swarm_trigger_step fail when there's no trigger request.

Otherwise it just returns 0 and it's trickier to figure out what went wrong.

Change the unit test to use auto_stub so mocking is saner and add stdout&stderr
verification, so that the test is not noisy anymore.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@201600 0039d316-1c4b-4281-b951-d872f2087c98

4 weeks agoMake trace_inputs.py read ... | less not print a stack trace on early exit.
maruel@chromium.org [Tue, 21 May 2013 16:56:05 +0000 (16:56 +0000)]
Make trace_inputs.py read ... | less not print a stack trace on early exit.

This is less clunky when the user quits before the whole output was written or
the user Ctrl-C out, the stack trace is not useful.

Manually tested.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@201318 0039d316-1c4b-4281-b951-d872f2087c98

4 weeks agoRemove trace_inputs dependency on run_isolated.
maruel@chromium.org [Tue, 21 May 2013 14:50:53 +0000 (14:50 +0000)]
Remove trace_inputs dependency on run_isolated.

I prefer to keep trace_inputs a stand-alone tool. This had regressed in r190463.
This results in 21 duplicated lines but I don't think it's a big deal.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@201305 0039d316-1c4b-4281-b951-d872f2087c98

4 weeks agoFix two strace bugs found while tracing ninja.
maruel@chromium.org [Tue, 21 May 2013 14:38:57 +0000 (14:38 +0000)]
Fix two strace bugs found while tracing ninja.

Add vfork() handling. ninja is the first process I trace that is using vfork()
instead of clone.

Add handling of slightly differently cut command line in execve(). It happens
with the C++ compiler command line because it can get unweldly.

Add relevant unit test.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@201304 0039d316-1c4b-4281-b951-d872f2087c98

4 weeks agoSwitch .log format to be generated by a member function.
maruel@chromium.org [Thu, 16 May 2013 16:42:54 +0000 (16:42 +0000)]
Switch .log format to be generated by a member function.

It will make customization easier when strace support is modified.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@200553 0039d316-1c4b-4281-b951-d872f2087c98

5 weeks agoStop calling /cleanup_results, so the results stay on the server unlike GC'ed.
maruel@chromium.org [Fri, 10 May 2013 15:23:20 +0000 (15:23 +0000)]
Stop calling /cleanup_results, so the results stay on the server unlike GC'ed.

Prints the 'test name' when triggering.

Both together makes it possible to locally get results for a try job.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@199483 0039d316-1c4b-4281-b951-d872f2087c98

5 weeks agoRetry Getting Swarm Test Keys
csharp@chromium.org [Fri, 10 May 2013 13:22:50 +0000 (13:22 +0000)]
Retry Getting Swarm Test Keys

App engine's data is only eventually consistent, so the script may need to try
and get them multiple times since they might not be available right away.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@199470 0039d316-1c4b-4281-b951-d872f2087c98

6 weeks agoAdd swarm_trigger_step.py --profile flag so we don't lose profiling info.
maruel@chromium.org [Thu, 2 May 2013 14:00:43 +0000 (14:00 +0000)]
Add swarm_trigger_step.py --profile flag so we don't lose profiling info.

Have ISOLATE_DEBUG=1 infer --profile so profiling data is printed for the
canary swarm buildbot master.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@197915 0039d316-1c4b-4281-b951-d872f2087c98

6 weeks agoDisable support for decorate_output=False.
maruel@chromium.org [Thu, 2 May 2013 00:51:37 +0000 (00:51 +0000)]
Disable support for decorate_output=False.

I want to check if this is what is causing the swarm step failures.

Disable running example/run_example_swarm.py in the presubmit check because it
exposes a race condition too often, e.g. it's flaky.

TBR=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@197757 0039d316-1c4b-4281-b951-d872f2087c98

6 weeks agoMake run_test_cases.py more resilient against bad output.
maruel@chromium.org [Wed, 1 May 2013 22:54:13 +0000 (22:54 +0000)]
Make run_test_cases.py more resilient against bad output.

TBR=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@197737 0039d316-1c4b-4281-b951-d872f2087c98

6 weeks agoMake swarm_trigger_step.py less verbose by default.
maruel@chromium.org [Wed, 1 May 2013 20:23:44 +0000 (20:23 +0000)]
Make swarm_trigger_step.py less verbose by default.

Add swarm_get_results_smoke_test.py to call example/run_example_swarm.py to
make sure it works end-to-end.

Add a TODO about a known bug in when accessing /get_matching_test_cases.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@197702 0039d316-1c4b-4281-b951-d872f2087c98

6 weeks agoRemove --shards and reads Swarm new meta data to know the shard index.
maruel@chromium.org [Wed, 1 May 2013 17:01:11 +0000 (17:01 +0000)]
Remove --shards and reads Swarm new meta data to know the shard index.

This removes clunky stdout parsing and efficiently eliminate duplicate shards,
without having to know the exact number of shards in advance.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@197643 0039d316-1c4b-4281-b951-d872f2087c98

6 weeks agoChange swarm_get_results to use ThreadPool.
maruel@chromium.org [Wed, 1 May 2013 15:52:20 +0000 (15:52 +0000)]
Change swarm_get_results to use ThreadPool.

This simplifies the adhoc thread pooling with a tested implementation. Also
make the number of worker threads configurable.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@197621 0039d316-1c4b-4281-b951-d872f2087c98

7 weeks agoMake swarm_get_results usable as a library.
maruel@chromium.org [Wed, 1 May 2013 01:10:23 +0000 (01:10 +0000)]
Make swarm_get_results usable as a library.

This is done so build/scripts/slave/get_swarm_results.py can reuse the same
code. It will be useful once Swarm enforces tokens.

Make it fetch results in parallel to return results as soon as they arrives,
instead of going through in order.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@197535 0039d316-1c4b-4281-b951-d872f2087c98

7 weeks agoFix handling of externally visible eventual consistency.
maruel@chromium.org [Tue, 30 Apr 2013 20:48:52 +0000 (20:48 +0000)]
Fix handling of externally visible eventual consistency.

The previous code retried but didn't sleep, causing retries that are too fast.
Now prints out when inconsistency is externally visible, just like
isolateserver/tests/main_smoke_test.py does.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@197460 0039d316-1c4b-4281-b951-d872f2087c98

7 weeks agoAdd max_attempts and timeout to url_open().
maruel@chromium.org [Tue, 30 Apr 2013 20:14:58 +0000 (20:14 +0000)]
Add max_attempts and timeout to url_open().

In addition to the default 30 maximum retries, also enforces a default maximum
6 minutes timeout. The timeout should be tuned as necessary.

Make isolateserver_archive wait between blobstore upload failure.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@197442 0039d316-1c4b-4281-b951-d872f2087c98

7 weeks agoHandle symlinked intermediary directory using absolute path as normal directory.
maruel@chromium.org [Mon, 29 Apr 2013 18:51:09 +0000 (18:51 +0000)]
Handle symlinked intermediary directory using absolute path as normal directory.

This requires special handling, the symlink must be considered a normal
directory. Add proper regression tests.

BUG=236293
R=csharp@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@197097 0039d316-1c4b-4281-b951-d872f2087c98

7 weeks agoNote the input causing the error in the error message.
maruel@chromium.org [Fri, 26 Apr 2013 18:48:40 +0000 (18:48 +0000)]
Note the input causing the error in the error message.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@196791 0039d316-1c4b-4281-b951-d872f2087c98

7 weeks agoDo not retry uploading to blobstore on HTTP 500, regenerate a new url first.
maruel@chromium.org [Fri, 26 Apr 2013 17:57:42 +0000 (17:57 +0000)]
Do not retry uploading to blobstore on HTTP 500, regenerate a new url first.

This is important since after an HTTP 500, the temporary url is likely invalid.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@196770 0039d316-1c4b-4281-b951-d872f2087c98

7 weeks agoRemove unnamed arguments from url_open() except url which is mandatory.
maruel@chromium.org [Fri, 26 Apr 2013 17:53:27 +0000 (17:53 +0000)]
Remove unnamed arguments from url_open() except url which is mandatory.

This makes the code relating to url_open() easier to maintain and extend.

Differentiate 'url' used to mean both urlhost and urlpath. This makes
the code more readable about what is what.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@196766 0039d316-1c4b-4281-b951-d872f2087c98

7 weeks agoRename hash_contents to content.
maruel@chromium.org [Thu, 25 Apr 2013 19:21:30 +0000 (19:21 +0000)]
Rename hash_contents to content.

The name makes more sense, the server supports both but support for
hash_contents will be removed eventually.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@196453 0039d316-1c4b-4281-b951-d872f2087c98

7 weeks agoProperly quote the token.
maruel@chromium.org [Wed, 24 Apr 2013 14:41:55 +0000 (14:41 +0000)]
Properly quote the token.

It will soon be in base64 so it needs to be quoted to be passed as a query
parameter.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@196145 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoFix symlink destination path case in .isolated file to be case preserving.
maruel@chromium.org [Thu, 18 Apr 2013 15:29:50 +0000 (15:29 +0000)]
Fix symlink destination path case in .isolated file to be case preserving.

Look at the actual destination path case instead of the value stored in the
symlink. The value stored in the symlink is often wrong. This happens on OSX
with case insensitive NFS.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@194930 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoAdd regression test for symlinks on OSX case insensitive NFS.
maruel@chromium.org [Thu, 18 Apr 2013 15:27:57 +0000 (15:27 +0000)]
Add regression test for symlinks on OSX case insensitive NFS.

Expose the bug where the symlink destination value is used in the .isolated file
instead of the actual path case of the destination on disk.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@194929 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoRemove unused option --no-run
csharp@chromium.org [Wed, 17 Apr 2013 13:31:47 +0000 (13:31 +0000)]
Remove unused option --no-run

R=maruel@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@194584 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoFix support to run a .isolated file from a different directory.
maruel@chromium.org [Tue, 16 Apr 2013 19:34:20 +0000 (19:34 +0000)]
Fix support to run a .isolated file from a different directory.

Add flag --skip-refresh to skip reindexing the dependencies.

Modifies the code to only store relative paths in .isolated.state. This permits
moving the file.

Fix tests on all OSes.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@194415 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoFix fix_test_cases.py when a test didn't even run, where returncode == None.
maruel@chromium.org [Tue, 16 Apr 2013 17:18:47 +0000 (17:18 +0000)]
Fix fix_test_cases.py when a test didn't even run, where returncode == None.

fix_test_cases.py was misinterpreting returncode == None as success, making it
unable to trace the test cases that didn't even start since it didn't realize
they were failing.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@194380 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoTest show failure when renaming a directory containing a .isolated field.
maruel@chromium.org [Mon, 15 Apr 2013 15:56:09 +0000 (15:56 +0000)]
Test show failure when renaming a directory containing a .isolated field.

isolate.py run fails to load a .isolated if the containing directory was
renamed. This is because the .isolated.state directory contains absolute paths.
R=csharp@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@194183 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoIncrease log level to ERROR for auth related log messages.
vadimsh@chromium.org [Wed, 10 Apr 2013 22:57:09 +0000 (22:57 +0000)]
Increase log level to ERROR for auth related log messages.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@193487 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoMake isolate.py hashtable print out the .isolated sha1.
maruel@chromium.org [Wed, 10 Apr 2013 21:27:28 +0000 (21:27 +0000)]
Make isolate.py hashtable print out the .isolated sha1.

The format is intentionally similar to sha1sum and compact so it doesn't clog
the build output but still give valuable basic information to be able to
retrieve the build from a try slave.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@193460 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoDetailed logging of authentication requests (HTTP 401 and 403 responses).
vadimsh@chromium.org [Wed, 10 Apr 2013 21:12:52 +0000 (21:12 +0000)]
Detailed logging of authentication requests (HTTP 401 and 403 responses).

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@193457 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoCall os.path.normpath on isolate_file when loading the .isolated.state file.
maruel@chromium.org [Tue, 9 Apr 2013 22:15:26 +0000 (22:15 +0000)]
Call os.path.normpath on isolate_file when loading the .isolated.state file.

Windows' version of get_native_path_case() doesn't like unnormalized paths.

TBR=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@193231 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoDo not assert that self.isolated_files is empty when loading the variables.
maruel@chromium.org [Tue, 9 Apr 2013 21:12:50 +0000 (21:12 +0000)]
Do not assert that self.isolated_files is empty when loading the variables.

It is a valid case that a previous valid .isolated.state file was loaded and is
being updated.

TBR=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@193211 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoMake isolate.py store relative path for isolate_file in .state file.
maruel@chromium.org [Tue, 9 Apr 2013 20:24:11 +0000 (20:24 +0000)]
Make isolate.py store relative path for isolate_file in .state file.

Also make isolate.py more resilient against invalid .state file.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@193192 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoFix handling of HTTP redirects.
vadimsh@chromium.org [Fri, 5 Apr 2013 19:44:54 +0000 (19:44 +0000)]
Fix handling of HTTP redirects.

Also log headers of bad HTTP responses.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@192612 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoDo not sudo unless necessary.
maruel@chromium.org [Fri, 5 Apr 2013 18:01:02 +0000 (18:01 +0000)]
Do not sudo unless necessary.

This makes it easier to run the swarm_client smoke tests on
insecure systems.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@192600 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoMake swarm_trigger_and_get_results.py much more useful.
maruel@chromium.org [Fri, 5 Apr 2013 15:42:42 +0000 (15:42 +0000)]
Make swarm_trigger_and_get_results.py much more useful.

Make it accept a .isolate or a .isolated, accept different servers and use sane
defaults, have it support run commands on a different OS.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@192568 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoChange ThreadSafeCookieJar to not crash on invalid path.
maruel@chromium.org [Fri, 5 Apr 2013 00:18:44 +0000 (00:18 +0000)]
Change ThreadSafeCookieJar to not crash on invalid path.

The Windows Swarm slaves have trouble exanding '~' so in the meantime, make
them not crash if the file path is invalid.

TBR=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@192430 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoAdd support for tokens in swarm_trigger_step.py.
maruel@chromium.org [Thu, 4 Apr 2013 22:03:16 +0000 (22:03 +0000)]
Add support for tokens in swarm_trigger_step.py.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@192395 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoRemove old flag (--manifest) from run_isolated.py
csharp@chromium.org [Thu, 4 Apr 2013 21:00:22 +0000 (21:00 +0000)]
Remove old flag (--manifest) from run_isolated.py

R=maruel@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@192393 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoAdd WATCHLISTS to swarm_client.
maruel@chromium.org [Thu, 4 Apr 2013 20:57:40 +0000 (20:57 +0000)]
Add WATCHLISTS to swarm_client.

R=csharp@chromium.org,vadimsh@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@192392 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoApp engine authentication support via upload.py.
vadimsh@chromium.org [Thu, 4 Apr 2013 19:34:21 +0000 (19:34 +0000)]
App engine authentication support via upload.py.

Currently works only with isolate_server.

TEST=./example/run_example_swarm.py on a non-whitelisted machine

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@192389 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoisolate.py: Add support for both -V FOO=BAR and -V FOO BAR.
maruel@chromium.org [Thu, 4 Apr 2013 17:52:34 +0000 (17:52 +0000)]
isolate.py: Add support for both -V FOO=BAR and -V FOO BAR.

This is necessary to work around GYP silliness when two variables are set to
the same value, e.g.: with "-V foo 0 -V bar 0", gyp would reduce to
"-V foo 0 -V bar" but this format is still required for paths that need
escaping, so support both.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@192361 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoProperly handle symlinks on Mac where the symlink has a different case
csharp@chromium.org [Thu, 4 Apr 2013 14:20:20 +0000 (14:20 +0000)]
Properly handle symlinks on Mac where the symlink has a different case
then the target.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@192327 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoMake run_swarm_tests_on_swarm.py run everything in parallel.
maruel@chromium.org [Wed, 3 Apr 2013 21:35:35 +0000 (21:35 +0000)]
Make run_swarm_tests_on_swarm.py run everything in parallel.

Use output similar to run_test_cases.py. It gives numbers against which we can
optimize. Some tests take over 2m30s so there is room for optimization (or
increase the Swarm slave pool). Note that running the presubmit checks locally
take less than 60s total so there is room for improvement.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@192166 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoDo not set GTEST_* when not needed.
maruel@chromium.org [Wed, 3 Apr 2013 15:58:21 +0000 (15:58 +0000)]
Do not set GTEST_* when not needed.

Otherwise they could conflict with the tests.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@192073 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoFix a race condition that usually happens on linux in run_test_case_test.py
maruel@chromium.org [Wed, 3 Apr 2013 15:35:33 +0000 (15:35 +0000)]
Fix a race condition that usually happens on linux in run_test_case_test.py

It's a particular use case of recv_any(timeout=0) with a loop for proc.poll()
is None. Once the process terminated, it is not guaranteed that the pipe was
exhausted.

Improve failure output to ease debugging.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@192069 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoAlso ignores .swp files.
maruel@chromium.org [Wed, 3 Apr 2013 15:30:24 +0000 (15:30 +0000)]
Also ignores .swp files.

These are temporary vim files. Annoying when running swarm_client tests on
Swarm and an editor is open.

Rename default_blacklist to chromium_default_blacklist to make this clear the
blacklist is chromium-specific.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@192067 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoFix trace_inputs.py read command with native path case.
maruel@chromium.org [Tue, 2 Apr 2013 22:27:05 +0000 (22:27 +0000)]
Fix trace_inputs.py read command with native path case.

It used to assume --root-dir flag was specified with a native path case. This
fixes two test case failures but there are still a fair number of test cases
that fail when run on Swarm.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@191917 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoFix trace_input_test.py on Windows.
maruel@chromium.org [Tue, 2 Apr 2013 22:27:02 +0000 (22:27 +0000)]
Fix trace_input_test.py on Windows.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@191916 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoFix path case expectation in isolate_smoke_test.py
maruel@chromium.org [Tue, 2 Apr 2013 22:24:34 +0000 (22:24 +0000)]
Fix path case expectation in isolate_smoke_test.py

This fixes running isolate_smoke_test.py from a temporary directory, which
happens when it is run on Swarm.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@191915 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoIncrease UrlOpen time outs and attempts before giving up.
csharp@chromium.org [Tue, 2 Apr 2013 17:11:25 +0000 (17:11 +0000)]
Increase UrlOpen time outs and attempts before giving up.

In the worst case this could result in waiting 570 seconds before aborting.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@191843 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoEnsure the cwd and isolate_file path case are correct.
maruel@chromium.org [Thu, 28 Mar 2013 13:27:09 +0000 (13:27 +0000)]
Ensure the cwd and isolate_file path case are correct.

Even if it is only used in the .isolated.state file, this is important for
consistency. This was reproduced when the native path case is wrong or in 8.3
form, which tends to happen more often when isolate_test.py is run from the
%TEMP% directory.

R=csharp@chromium.org
BUG=
TEST=tools/run_swarm_tests_on_swarm.py -t isolated_test.py -o win32

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@191149 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoStop using get_flavor() in process_input().
maruel@chromium.org [Thu, 28 Mar 2013 13:24:51 +0000 (13:24 +0000)]
Stop using get_flavor() in process_input().

When sending a Swarm task to a Windows slave from linux or OSX, it do not
archive the file mode 'm'.

Also do not crash if 'm' is present.
R=csharp@chromium.org
BUG=
TEST=tools/run_swarm_tests_on_swarm.py -t run_isolated_smoke_test.py -o win32

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@191148 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoMake downloading an .isolated file with symlinks on Windows a warning.
maruel@chromium.org [Thu, 28 Mar 2013 13:23:31 +0000 (13:23 +0000)]
Make downloading an .isolated file with symlinks on Windows a warning.

Previously it just crashed. Fix test_download_isolated to pass on Windows.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@191147 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoFix xml in run_test_cases.py for crashing test.
maruel@chromium.org [Wed, 27 Mar 2013 22:24:56 +0000 (22:24 +0000)]
Fix xml in run_test_cases.py for crashing test.

This was tentatively fixed in r191008 but it included no test, and I missed a
None reference. Added a test to ensure crashed test are properly saved.

TBR=csharp@chromium.org
BUG=224432

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@191052 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoReplace duration==None to 0 when saving to XML.
maruel@chromium.org [Wed, 27 Mar 2013 20:23:11 +0000 (20:23 +0000)]
Replace duration==None to 0 when saving to XML.

It can happen when a test case is systematically crashing, so that no duration
is calculated.

TBR=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@191008 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoAdd more explanation to the gtest_fake_confused_*.py.
maruel@chromium.org [Wed, 27 Mar 2013 17:51:30 +0000 (17:51 +0000)]
Add more explanation to the gtest_fake_confused_*.py.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190973 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoChange run_test_cases to always put in xml the first try instead of the last try
maruel@chromium.org [Wed, 27 Mar 2013 17:46:53 +0000 (17:46 +0000)]
Change run_test_cases to always put in xml the first try instead of the last try

This will fill the flakiness dashboard with all the flaky tests, even if the
overall testing passed with retries. This had received approbation on
chromium-dev a few weeks ago but I had forgot to implement it.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190972 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoAdd flags to run only one test or one OS.
maruel@chromium.org [Wed, 27 Mar 2013 17:40:23 +0000 (17:40 +0000)]
Add flags to run only one test or one OS.

This permits quicker checks.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190968 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoAdd support to store logs of failed tests.
maruel@chromium.org [Wed, 27 Mar 2013 17:09:06 +0000 (17:09 +0000)]
Add support to store logs of failed tests.

This is useful to track each error individually.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190962 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoHandle ./ in mac path
csharp@chromium.org [Wed, 27 Mar 2013 17:07:50 +0000 (17:07 +0000)]
Handle ./ in mac path

R=maruel@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190961 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoFix a typo in run_test_cases causing less retries.
maruel@chromium.org [Wed, 27 Mar 2013 16:41:53 +0000 (16:41 +0000)]
Fix a typo in run_test_cases causing less retries.

Fix expectations so that, even with very confused test executatables, the
number of tries is exactly what was requested.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190954 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoReduce 206 lines of text duplication in the test expectations.
maruel@chromium.org [Wed, 27 Mar 2013 16:40:17 +0000 (16:40 +0000)]
Reduce 206 lines of text duplication in the test expectations.

No functional change.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190952 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoStabilize run_test_cases.Popen.recv_any() and yield_any() on Windows.
maruel@chromium.org [Wed, 27 Mar 2013 15:02:18 +0000 (15:02 +0000)]
Stabilize run_test_cases.Popen.recv_any() and yield_any() on Windows.

There was a small window of race condition:
- both stdout and stderr are set to subprocess.PIPE
- on child process shutdown
- a pipe closes, raising an error
- the other pipe is not flushed

It is very hard to reproduce so I made the code more resilient and tested
while building browser_tests.

Also added a comment about how the code could be improved by using
WaitForMultipleObjects().

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190935 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoAdd tests for confused test cases.
maruel@chromium.org [Wed, 27 Mar 2013 14:41:40 +0000 (14:41 +0000)]
Add tests for confused test cases.

A confused test is one that says it passed but return 1 or the reverse.

Note that gtest_fake_confused_pass is only tried twice but
gtest_fake_confused_fail is tried 3 times. This test only document the current
behavior, the retry mechanism will likely be adjusted later.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190932 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoSkip Symlinks if the target platform is Windows
csharp@chromium.org [Wed, 27 Mar 2013 13:38:42 +0000 (13:38 +0000)]
Skip Symlinks if the target platform is Windows

R=maruel@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190925 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoDo not crash on test case that do not have time tag.
maruel@chromium.org [Tue, 26 Mar 2013 22:50:06 +0000 (22:50 +0000)]
Do not crash on test case that do not have time tag.

Add a regression test.

TBR=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190789 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoAdd checks for test case that crash after printing that they succeeded.
maruel@chromium.org [Tue, 26 Mar 2013 20:38:23 +0000 (20:38 +0000)]
Add checks for test case that crash after printing that they succeeded.

Improve retry mechanism to handle this case specifically and add corresponding
smoke test.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190755 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoSet Default Encoding to utf-8 in run_isolated.py
csharp@chromium.org [Tue, 26 Mar 2013 20:28:36 +0000 (20:28 +0000)]
Set Default Encoding to utf-8 in run_isolated.py

This ensure that run_isolated.py is always run with utf-8, as
it can encounter problems with other encoding.

R=maruel@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190753 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoAccumulate output before and after detected test cases.
maruel@chromium.org [Tue, 26 Mar 2013 19:21:00 +0000 (19:21 +0000)]
Accumulate output before and after detected test cases.

This helps with setup or teardown code path errors at the potential cost of
noisier failure output.

It makes process_output() a bit hard to read but both the unit tests and smoke
tests ensure it is behaving properly. It was tricky to implement since I wanted
it to work just fine if lines is either a generator or a list. Both have
different inner loop semantics, e.g. the following code acts differently:
for i, line in enumerate(lines):
  if i == 1:
    for line in lines:
      pass
    break

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190729 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoFix symlink setup.
csharp@chromium.org [Tue, 26 Mar 2013 18:56:21 +0000 (18:56 +0000)]
Fix symlink setup.

Print a list of which tests failed on which platform when run on swarm.

R=maruel@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190725 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoBetter handle missing test cases.
maruel@chromium.org [Tue, 26 Mar 2013 18:13:20 +0000 (18:13 +0000)]
Better handle missing test cases.

More testing will follow up soon.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190717 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoTemporarilly disable timeout when listing test cases.
maruel@chromium.org [Tue, 26 Mar 2013 17:36:41 +0000 (17:36 +0000)]
Temporarilly disable timeout when listing test cases.

It looks like call_with_timeout() has a race condition with fast quitting
processes, so it exhibits only with very small unit tests, mostly on Windows.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190713 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoKill 101 lines of code, simplify the gtest_fake_* code.
maruel@chromium.org [Tue, 26 Mar 2013 17:29:28 +0000 (17:29 +0000)]
Kill 101 lines of code, simplify the gtest_fake_* code.

Makes the code more consistent accross the files.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190709 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoReturn 1 if missing test cases even if not stopped early.
maruel@chromium.org [Tue, 26 Mar 2013 16:35:40 +0000 (16:35 +0000)]
Return 1 if missing test cases even if not stopped early.

This should catch cases where a parsing error occurred.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190698 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoFix test case result streaming support in run_test_cases.py.
maruel@chromium.org [Tue, 26 Mar 2013 14:38:00 +0000 (14:38 +0000)]
Fix test case result streaming support in run_test_cases.py.

This needed a rework of ThreadPool, which still assumes a 1:1 mapping between
inputs and ouputs. This will need to be changed eventually to have a cleaner
API.

This requires not normalizing the results at the end anymore.

Reduce verbosity at debug level.

Add regression test.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190682 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoFix support for missing LF in test case output.
maruel@chromium.org [Tue, 26 Mar 2013 14:06:10 +0000 (14:06 +0000)]
Fix support for missing LF in test case output.

R=csharp@chromium.org
BUG=223787

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190676 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoFix a bug in list_test_cases.py and add a small test.
maruel@chromium.org [Tue, 26 Mar 2013 13:41:11 +0000 (13:41 +0000)]
Fix a bug in list_test_cases.py and add a small test.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190673 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoEnforce disabling python internal buffering for all scripts.
maruel@chromium.org [Mon, 25 Mar 2013 19:55:34 +0000 (19:55 +0000)]
Enforce disabling python internal buffering for all scripts.

The buffering is annoying for our testing when a test hangs so it is preferable
to keep it disabled and eat the performance hit.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190463 0039d316-1c4b-4281-b951-d872f2087c98

2 months agoClarify yield_any() and recv_any() semantic by adding tests and docstrings.
maruel@chromium.org [Mon, 25 Mar 2013 19:41:10 +0000 (19:41 +0000)]
Clarify yield_any() and recv_any() semantic by adding tests and docstrings.

Make sure the timeout value are doing what is expected from them.

Handle select.error exceptions.

Remove recv_impl() to reduce the number of implementations.

Bump maxsize default to 16kb.

R=csharp@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/swarm_client@190462 0039d316-1c4b-4281-b951-d872f2087c98