summaryrefslogtreecommitdiffstats
path: root/build/android/gyp/java_cpp_enum_tests.py
diff options
context:
space:
mode:
authormkosiba <mkosiba@chromium.org>2014-11-12 15:12:42 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-12 23:13:02 +0000
commit2d82a68bab29b8ade0ae898f51c7cc7df1a5f85d (patch)
treecd2c171ed37a8b5128047e3761d7b50cb721e9d5 /build/android/gyp/java_cpp_enum_tests.py
parent78d76ab917e3b965deb7341e122d082110834925 (diff)
downloadchromium_src-2d82a68bab29b8ade0ae898f51c7cc7df1a5f85d.zip
chromium_src-2d82a68bab29b8ade0ae898f51c7cc7df1a5f85d.tar.gz
chromium_src-2d82a68bab29b8ade0ae898f51c7cc7df1a5f85d.tar.bz2
Fix java_cpp_enum_tests to run on the bots.
The bots invoke the tests with a different argv[0] causing the script name to change. BUG=None Review URL: https://codereview.chromium.org/720893003 Cr-Commit-Position: refs/heads/master@{#303913}
Diffstat (limited to 'build/android/gyp/java_cpp_enum_tests.py')
-rwxr-xr-xbuild/android/gyp/java_cpp_enum_tests.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/build/android/gyp/java_cpp_enum_tests.py b/build/android/gyp/java_cpp_enum_tests.py
index 0d0049b..3aa386e 100755
--- a/build/android/gyp/java_cpp_enum_tests.py
+++ b/build/android/gyp/java_cpp_enum_tests.py
@@ -14,7 +14,8 @@ import os
import sys
import unittest
-from java_cpp_enum import EnumDefinition, GenerateOutput, HeaderParser
+from java_cpp_enum import EnumDefinition, GenerateOutput, GetScriptName
+from java_cpp_enum import HeaderParser
sys.path.append(os.path.join(os.path.dirname(__file__), "gyp"))
from util import build_utils
@@ -31,7 +32,7 @@ class TestPreprocess(unittest.TestCase):
// found in the LICENSE file.
// This file is autogenerated by
-// build/android/gyp/java_cpp_enum_tests.py
+// %s
// From
// path/to/file
@@ -42,7 +43,7 @@ public class ClassName {
public static final int E2 = 2 << 2;
}
"""
- self.assertEqual(expected, output)
+ self.assertEqual(expected % GetScriptName(), output)
def testParseSimpleEnum(self):
test_data = """