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

Side by Side Diff: build/android/pylib/utils/device_dependencies_test.py

Issue 2514453003: Revert of [android] Stop using isolate.py for data dependency management. (Closed)
Patch Set: manual rebase Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « build/android/pylib/utils/device_dependencies.py ('k') | build/android/pylib/utils/isolator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #! /usr/bin/env python
2 # Copyright 2016 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import os
7 import unittest
8
9 from pylib import constants
10 from pylib.utils import device_dependencies
11
12
13 class DevicePathComponentsForTest(unittest.TestCase):
14
15 def testCheckedInFile(self):
16 test_path = os.path.join(constants.DIR_SOURCE_ROOT, 'foo', 'bar', 'baz.txt')
17 output_directory = os.path.join(
18 constants.DIR_SOURCE_ROOT, 'out-foo', 'Release')
19 self.assertEquals(
20 [None, 'foo', 'bar', 'baz.txt'],
21 device_dependencies.DevicePathComponentsFor(
22 test_path, output_directory))
23
24 def testOutputDirectoryFile(self):
25 test_path = os.path.join(constants.DIR_SOURCE_ROOT, 'out-foo', 'Release',
26 'icudtl.dat')
27 output_directory = os.path.join(
28 constants.DIR_SOURCE_ROOT, 'out-foo', 'Release')
29 self.assertEquals(
30 [None, 'icudtl.dat'],
31 device_dependencies.DevicePathComponentsFor(
32 test_path, output_directory))
33
34 def testOutputDirectorySubdirFile(self):
35 test_path = os.path.join(constants.DIR_SOURCE_ROOT, 'out-foo', 'Release',
36 'test_dir', 'icudtl.dat')
37 output_directory = os.path.join(
38 constants.DIR_SOURCE_ROOT, 'out-foo', 'Release')
39 self.assertEquals(
40 [None, 'test_dir', 'icudtl.dat'],
41 device_dependencies.DevicePathComponentsFor(
42 test_path, output_directory))
43
44 def testOutputDirectoryPakFile(self):
45 test_path = os.path.join(constants.DIR_SOURCE_ROOT, 'out-foo', 'Release',
46 'foo.pak')
47 output_directory = os.path.join(
48 constants.DIR_SOURCE_ROOT, 'out-foo', 'Release')
49 self.assertEquals(
50 [None, 'paks', 'foo.pak'],
51 device_dependencies.DevicePathComponentsFor(
52 test_path, output_directory))
53
54
55 if __name__ == '__main__':
56 unittest.main()
OLDNEW
« no previous file with comments | « build/android/pylib/utils/device_dependencies.py ('k') | build/android/pylib/utils/isolator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698