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

Side by Side Diff: platform_tools/android/tests/gyp_to_android_tests.py

Issue 481943002: Fix Android platform self-tests (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright 2014 Google Inc. 3 # Copyright 2014 Google Inc.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license that can be 5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file. 6 # found in the LICENSE file.
7 7
8 """ 8 """
9 Test gyp_to_android.py 9 Test gyp_to_android.py
10 """ 10 """
(...skipping 19 matching lines...) Expand all
30 self.__tmp_dir = tempfile.mkdtemp() 30 self.__tmp_dir = tempfile.mkdtemp()
31 31
32 def test_create(self): 32 def test_create(self):
33 gyp_to_android.main(self.__tmp_dir) 33 gyp_to_android.main(self.__tmp_dir)
34 34
35 # Now there should be a file named 'Android.mk' inside __tmp_dir 35 # Now there should be a file named 'Android.mk' inside __tmp_dir
36 path_to_android_mk = os.path.join(self.__tmp_dir, 36 path_to_android_mk = os.path.join(self.__tmp_dir,
37 test_variables.ANDROID_MK) 37 test_variables.ANDROID_MK)
38 self.assertTrue(os.path.exists(path_to_android_mk)) 38 self.assertTrue(os.path.exists(path_to_android_mk))
39 39
40 # In addition, there should be an 'Android.mk' inside /tests/
41 path_to_tests_android_mk = os.path.join(self.__tmp_dir, 'tests',
42 test_variables.ANDROID_MK)
43 self.assertTrue(os.path.exists(path_to_tests_android_mk))
44
45 def tearDown(self): 40 def tearDown(self):
46 # Remove self.__tmp_dir, which is no longer needed. 41 # Remove self.__tmp_dir, which is no longer needed.
47 shutil.rmtree(self.__tmp_dir) 42 shutil.rmtree(self.__tmp_dir)
48 43
49 44
50 def main(): 45 def main():
51 loader = unittest.TestLoader() 46 loader = unittest.TestLoader()
52 suite = loader.loadTestsFromTestCase(AndroidMkCreationTest) 47 suite = loader.loadTestsFromTestCase(AndroidMkCreationTest)
53 unittest.TextTestRunner(verbosity=2).run(suite) 48 unittest.TextTestRunner(verbosity=2).run(suite)
54 49
55 if __name__ == "__main__": 50 if __name__ == "__main__":
56 main() 51 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698