From 9bd83f58f29ab0c7c5b71b00bcb1df3a9e641f05 Mon Sep 17 00:00:00 2001 From: machenbach Date: Fri, 2 Oct 2015 08:15:28 -0700 Subject: [PATCH] [swarming] Isolate v8 testing. Add gyp support and isolates for default test suites. Add two default isolates, one (default) for using the test suite collection we call "default" on the bots. One (developer_default) for also supporting the way developers call the driver (i.e. without argument, which includes the unittests). BUG=chromium:535160 LOG=n Review URL: https://codereview.chromium.org/1380593002 Cr-Commit-Position: refs/heads/master@{#31081} --- build/all.gyp | 10 ++++++++++ test/cctest/cctest.gyp | 19 +++++++++++++++++++ test/cctest/cctest.isolate | 16 ++++++++++++++++ test/default.gyp | 29 +++++++++++++++++++++++++++++ test/default.isolate | 12 ++++++++++++ test/developer_default.gyp | 26 ++++++++++++++++++++++++++ test/developer_default.isolate | 9 +++++++++ test/intl/intl.gyp | 25 +++++++++++++++++++++++++ test/intl/intl.isolate | 14 ++++++++++++++ test/message/message.gyp | 25 +++++++++++++++++++++++++ test/message/message.isolate | 14 ++++++++++++++ test/mjsunit/mjsunit.gyp | 25 +++++++++++++++++++++++++ test/mjsunit/mjsunit.isolate | 23 +++++++++++++++++++++++ test/preparser/preparser.gyp | 25 +++++++++++++++++++++++++ test/preparser/preparser.isolate | 14 ++++++++++++++ test/unittests/unittests.gyp | 19 +++++++++++++++++++ test/unittests/unittests.isolate | 15 +++++++++++++++ tools/testrunner/testrunner.isolate | 14 ++++++++++++++ 18 files changed, 334 insertions(+) create mode 100644 test/cctest/cctest.isolate create mode 100644 test/default.gyp create mode 100644 test/default.isolate create mode 100644 test/developer_default.gyp create mode 100644 test/developer_default.isolate create mode 100644 test/intl/intl.gyp create mode 100644 test/intl/intl.isolate create mode 100644 test/message/message.gyp create mode 100644 test/message/message.isolate create mode 100644 test/mjsunit/mjsunit.gyp create mode 100644 test/mjsunit/mjsunit.isolate create mode 100644 test/preparser/preparser.gyp create mode 100644 test/preparser/preparser.isolate create mode 100644 test/unittests/unittests.isolate create mode 100644 tools/testrunner/testrunner.isolate diff --git a/build/all.gyp b/build/all.gyp index 4aeb507dca..1640b972e7 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -19,6 +19,16 @@ '../tools/parser-shell.gyp:parser-shell', ], }], + ['test_isolation_mode != "noop"', { + 'dependencies': [ + '../test/default.gyp:*', + '../test/developer_default.gyp:*', + '../test/intl/intl.gyp:*', + '../test/message/message.gyp:*', + '../test/mjsunit/mjsunit.gyp:*', + '../test/preparser/preparser.gyp:*', + ], + }], ] } ] diff --git a/test/cctest/cctest.gyp b/test/cctest/cctest.gyp index 9563c2db85..529fd035fc 100644 --- a/test/cctest/cctest.gyp +++ b/test/cctest/cctest.gyp @@ -331,4 +331,23 @@ ], }, ], + 'conditions': [ + ['test_isolation_mode != "noop"', { + 'targets': [ + { + 'target_name': 'cctest_run', + 'type': 'none', + 'dependencies': [ + 'cctest', + ], + 'includes': [ + '../../build/isolate.gypi', + ], + 'sources': [ + 'cctest.isolate', + ], + }, + ], + }], + ], } diff --git a/test/cctest/cctest.isolate b/test/cctest/cctest.isolate new file mode 100644 index 0000000000..aee8d83f85 --- /dev/null +++ b/test/cctest/cctest.isolate @@ -0,0 +1,16 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'variables': { + 'files': [ + '<(PRODUCT_DIR)/cctest<(EXECUTABLE_SUFFIX)', + './cctest.status', + './testcfg.py', + ], + }, + 'includes': [ + '../../src/base.isolate', + '../../tools/testrunner/testrunner.isolate', + ], +} \ No newline at end of file diff --git a/test/default.gyp b/test/default.gyp new file mode 100644 index 0000000000..2ae0878e39 --- /dev/null +++ b/test/default.gyp @@ -0,0 +1,29 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'conditions': [ + ['test_isolation_mode != "noop"', { + 'targets': [ + { + 'target_name': 'default_run', + 'type': 'none', + 'dependencies': [ + 'cctest/cctest.gyp:cctest_run', + 'intl/intl.gyp:intl_run', + 'message/message.gyp:message_run', + 'mjsunit/mjsunit.gyp:mjsunit_run', + 'preparser/preparser.gyp:preparser_run', + ], + 'includes': [ + '../build/isolate.gypi', + ], + 'sources': [ + 'default.isolate', + ], + }, + ], + }], + ], +} diff --git a/test/default.isolate b/test/default.isolate new file mode 100644 index 0000000000..d3d0c1430e --- /dev/null +++ b/test/default.isolate @@ -0,0 +1,12 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'includes': [ + 'cctest/cctest.isolate', + 'intl/intl.isolate', + 'message/message.isolate', + 'mjsunit/mjsunit.isolate', + 'preparser/preparser.isolate', + ], +} \ No newline at end of file diff --git a/test/developer_default.gyp b/test/developer_default.gyp new file mode 100644 index 0000000000..c820dd8c03 --- /dev/null +++ b/test/developer_default.gyp @@ -0,0 +1,26 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'conditions': [ + ['test_isolation_mode != "noop"', { + 'targets': [ + { + 'target_name': 'developer_default_run', + 'type': 'none', + 'dependencies': [ + 'default.gyp:default_run', + 'unittests/unittests.gyp:unittests_run', + ], + 'includes': [ + '../build/isolate.gypi', + ], + 'sources': [ + 'developer_default.isolate', + ], + }, + ], + }], + ], +} diff --git a/test/developer_default.isolate b/test/developer_default.isolate new file mode 100644 index 0000000000..a22c379c34 --- /dev/null +++ b/test/developer_default.isolate @@ -0,0 +1,9 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'includes': [ + 'default.isolate', + 'unittests/unittests.isolate', + ], +} \ No newline at end of file diff --git a/test/intl/intl.gyp b/test/intl/intl.gyp new file mode 100644 index 0000000000..82a2e3ea97 --- /dev/null +++ b/test/intl/intl.gyp @@ -0,0 +1,25 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'conditions': [ + ['test_isolation_mode != "noop"', { + 'targets': [ + { + 'target_name': 'intl_run', + 'type': 'none', + 'dependencies': [ + '../../src/d8.gyp:d8_run', + ], + 'includes': [ + '../../build/isolate.gypi', + ], + 'sources': [ + 'intl.isolate', + ], + }, + ], + }], + ], +} diff --git a/test/intl/intl.isolate b/test/intl/intl.isolate new file mode 100644 index 0000000000..dbeca5e55c --- /dev/null +++ b/test/intl/intl.isolate @@ -0,0 +1,14 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'variables': { + 'files': [ + './', + ], + }, + 'includes': [ + '../../src/d8.isolate', + '../../tools/testrunner/testrunner.isolate', + ], +} \ No newline at end of file diff --git a/test/message/message.gyp b/test/message/message.gyp new file mode 100644 index 0000000000..ff2f9ac9e2 --- /dev/null +++ b/test/message/message.gyp @@ -0,0 +1,25 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'conditions': [ + ['test_isolation_mode != "noop"', { + 'targets': [ + { + 'target_name': 'message_run', + 'type': 'none', + 'dependencies': [ + '../../src/d8.gyp:d8_run', + ], + 'includes': [ + '../../build/isolate.gypi', + ], + 'sources': [ + 'message.isolate', + ], + }, + ], + }], + ], +} diff --git a/test/message/message.isolate b/test/message/message.isolate new file mode 100644 index 0000000000..dbeca5e55c --- /dev/null +++ b/test/message/message.isolate @@ -0,0 +1,14 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'variables': { + 'files': [ + './', + ], + }, + 'includes': [ + '../../src/d8.isolate', + '../../tools/testrunner/testrunner.isolate', + ], +} \ No newline at end of file diff --git a/test/mjsunit/mjsunit.gyp b/test/mjsunit/mjsunit.gyp new file mode 100644 index 0000000000..a9ae145c8a --- /dev/null +++ b/test/mjsunit/mjsunit.gyp @@ -0,0 +1,25 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'conditions': [ + ['test_isolation_mode != "noop"', { + 'targets': [ + { + 'target_name': 'mjsunit_run', + 'type': 'none', + 'dependencies': [ + '../../src/d8.gyp:d8_run', + ], + 'includes': [ + '../../build/isolate.gypi', + ], + 'sources': [ + 'mjsunit.isolate', + ], + }, + ], + }], + ], +} diff --git a/test/mjsunit/mjsunit.isolate b/test/mjsunit/mjsunit.isolate new file mode 100644 index 0000000000..18b73c2a14 --- /dev/null +++ b/test/mjsunit/mjsunit.isolate @@ -0,0 +1,23 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'variables': { + 'files': [ + './', + '../../tools/codemap.js', + '../../tools/consarray.js', + '../../tools/csvparser.js', + '../../tools/logreader.js', + '../../tools/profile.js', + '../../tools/profile_view.js', + '../../tools/profviz/composer.js', + '../../tools/splaytree.js', + '../../tools/tickprocessor.js' + ], + }, + 'includes': [ + '../../src/d8.isolate', + '../../tools/testrunner/testrunner.isolate', + ], +} \ No newline at end of file diff --git a/test/preparser/preparser.gyp b/test/preparser/preparser.gyp new file mode 100644 index 0000000000..68890bd1cc --- /dev/null +++ b/test/preparser/preparser.gyp @@ -0,0 +1,25 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'conditions': [ + ['test_isolation_mode != "noop"', { + 'targets': [ + { + 'target_name': 'preparser_run', + 'type': 'none', + 'dependencies': [ + '../../src/d8.gyp:d8_run', + ], + 'includes': [ + '../../build/isolate.gypi', + ], + 'sources': [ + 'preparser.isolate', + ], + }, + ], + }], + ], +} diff --git a/test/preparser/preparser.isolate b/test/preparser/preparser.isolate new file mode 100644 index 0000000000..dbeca5e55c --- /dev/null +++ b/test/preparser/preparser.isolate @@ -0,0 +1,14 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'variables': { + 'files': [ + './', + ], + }, + 'includes': [ + '../../src/d8.isolate', + '../../tools/testrunner/testrunner.isolate', + ], +} \ No newline at end of file diff --git a/test/unittests/unittests.gyp b/test/unittests/unittests.gyp index dcd0bf56aa..773eaf9c8e 100644 --- a/test/unittests/unittests.gyp +++ b/test/unittests/unittests.gyp @@ -178,4 +178,23 @@ ], }, ], + 'conditions': [ + ['test_isolation_mode != "noop"', { + 'targets': [ + { + 'target_name': 'unittests_run', + 'type': 'none', + 'dependencies': [ + 'unittests', + ], + 'includes': [ + '../../build/isolate.gypi', + ], + 'sources': [ + 'unittests.isolate', + ], + }, + ], + }], + ], } diff --git a/test/unittests/unittests.isolate b/test/unittests/unittests.isolate new file mode 100644 index 0000000000..ae503bf9bf --- /dev/null +++ b/test/unittests/unittests.isolate @@ -0,0 +1,15 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'variables': { + 'files': [ + '<(PRODUCT_DIR)/unittests<(EXECUTABLE_SUFFIX)', + './unittests.status', + ], + }, + 'includes': [ + '../../src/base.isolate', + '../../tools/testrunner/testrunner.isolate', + ], +} \ No newline at end of file diff --git a/tools/testrunner/testrunner.isolate b/tools/testrunner/testrunner.isolate new file mode 100644 index 0000000000..669614b283 --- /dev/null +++ b/tools/testrunner/testrunner.isolate @@ -0,0 +1,14 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'variables': { + 'command': [ + '../run-tests.py', + ], + 'files': [ + '../run-tests.py', + './' + ], + }, +} \ No newline at end of file