Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Unified Diff: test/cctest/SConscript

Issue 7354027: Convert *.js files of cctest/test-log into "resources". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/natives.h ('k') | test/cctest/log-eq-of-logging-and-traversal.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/SConscript
diff --git a/test/cctest/SConscript b/test/cctest/SConscript
index 0ef5667abd286e1c7238080a8e18edd8ff74c7d4..9dc41517acfb151621956ac275f2f44588c98a88 100644
--- a/test/cctest/SConscript
+++ b/test/cctest/SConscript
@@ -29,9 +29,23 @@ import sys
from os.path import join, dirname, abspath
root_dir = dirname(File('SConstruct').rfile().abspath)
sys.path.append(join(root_dir, 'tools'))
+import js2c
Import('context object_files tools')
+# Needed for test-log. Paths are relative to the cctest dir.
+JS_FILES_FOR_TESTS = '''
Sven Panne 2011/07/14 08:06:42 Tiny style issue: JS_FILES_FOR_TESTS = [ 'blah', '
mnaganov (inactive) 2011/07/14 11:36:26 Fixed!
+../../../tools/splaytree.js
+../../../tools/codemap.js
+../../../tools/csvparser.js
+../../../tools/consarray.js
+../../../tools/profile.js
+../../../tools/profile_view.js
+../../../tools/logreader.js
+log-eq-of-logging-and-traversal.js
+'''.split()
+
+
SOURCES = {
'all': [
'gay-fixed.cc',
@@ -109,9 +123,19 @@ def Build():
env = Environment(tools=tools)
env.Replace(**context.flags['cctest'])
context.ApplyEnvOverrides(env)
+ env['BUILDERS']['JS2C'] = Builder(action=js2c.JS2C)
+
+ # Combine the JavaScript library files into a single C++ file and
+ # compile it.
+ js_files = [s for s in JS_FILES_FOR_TESTS]
+ js_files_src = env.JS2C(
+ ['js-files-for-cctest.cc'], js_files, **{'TYPE': 'TEST', 'COMPRESSION': 'off'})
+ js_files_obj = context.ConfigureObject(env, js_files_src, CPPPATH=['.'])
+
# There seems to be a glitch in the way scons decides where to put
# PDB files when compiling using MSVC so we specify it manually.
# This should not affect any other platforms.
+ object_files.append(js_files_obj)
return env.Program('cctest', ['cctest.cc', cctest_files, object_files],
PDB='cctest.exe.pdb')
« no previous file with comments | « src/natives.h ('k') | test/cctest/log-eq-of-logging-and-traversal.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698