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

Unified Diff: appengine/findit/crash/test/crash_util_test.py

Issue 1861373003: [Findit] Initial code of findit for crash. Add scorers to apply heuristic rules. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fix nits and doc strings. Created 4 years, 8 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
Index: appengine/findit/crash/test/crash_util_test.py
diff --git a/appengine/findit/crash/test/crash_util_test.py b/appengine/findit/crash/test/crash_util_test.py
new file mode 100644
index 0000000000000000000000000000000000000000..4c17191b0f4dd8877996fa81734258bbbe558223
--- /dev/null
+++ b/appengine/findit/crash/test/crash_util_test.py
@@ -0,0 +1,26 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from testing_utils import testing
+
+from crash import crash_util
+
+
+class CrashUtilTest(testing.AppengineTestCase):
+
+ def testIsSameFilePath(self):
+ path1 = 'third_party/a/b/c/file.cc'
+ path2 = 'third_party/a/file.cc'
+
+ self.assertTrue(crash_util.IsSameFilePath(path1, path2))
stgao 2016/04/15 18:35:19 Why these two are treated as the same file paths?
Sharu 2016/04/15 22:59:47 This is the method we use in clusterfuzz all the t
+
+ path1 = 'a/b/c/file.cc'
+ path2 = 'a/b/c/file2.cc'
+
+ self.assertFalse(crash_util.IsSameFilePath(path1, path2))
+
+ path1 = 'a/b/c/d/e/file.cc'
+ path2 = 'f/g/file.cc'
+
+ self.assertFalse(crash_util.IsSameFilePath(path1, path2))

Powered by Google App Engine
This is Rietveld 408576698