Lines Matching refs:cls
129 def prepare(cls, example_name, package_name, activity_name, abi=None, adb_root=False): argument
130 cls.adb = AdbHelper(enable_switch_to_root=adb_root)
131 cls.example_path = os.path.join("testdata", example_name)
132 if not os.path.isdir(cls.example_path):
133 log_fatal("can't find " + cls.example_path)
134 for root, _, files in os.walk(cls.example_path):
136 cls.apk_path = os.path.join(root, 'app-profiling.apk')
138 if not hasattr(cls, 'apk_path'):
139 log_fatal("can't find app-profiling.apk under " + cls.example_path)
140 cls.package_name = package_name
141 cls.activity_name = activity_name
142 cls.abi = "arm64"
144 cls.abi = "arm"
148 args.append(cls.apk_path)
149 cls.adb.check_run(args)
150 cls.adb_root = adb_root
151 cls.compiled = False
152 cls.has_perf_data_for_report = False
153 android_version = cls.adb.get_android_version()
156 cls.use_compiled_java_code = android_version <= 8
161 cls = self.__class__
162 if not cls.has_perf_data_for_report:
163 cls.has_perf_data_for_report = True
174 def tearDownClass(cls): argument
175 if hasattr(cls, 'test_result') and cls.test_result and not cls.test_result.wasSuccessful():
177 if hasattr(cls, 'package_name'):
178 cls.adb.check_run(["uninstall", cls.package_name])
184 if cls.has_perf_data_for_report:
185 cls.has_perf_data_for_report = False
353 def setUpClass(cls): argument
354 cls.prepare("SimpleperfExamplePureJava",
497 def setUpClass(cls): argument
498 cls.prepare("SimpleperfExamplePureJava",
509 def setUpClass(cls): argument
510 cls.prepare("SimpleperfExamplePureJava",
546 def setUpClass(cls): argument
547 cls.prepare("SimpleperfExampleWithNative",
597 def setUpClass(cls): argument
598 cls.prepare("SimpleperfExampleWithNative",
609 def setUpClass(cls): argument
610 cls.prepare("SimpleperfExampleWithNative",
641 def setUpClass(cls): argument
642 cls.prepare("SimpleperfExampleWithNative",
673 def setUpClass(cls): argument
674 cls.prepare("SimpleperfExampleWithNative",
682 def setUpClass(cls): argument
683 cls.prepare("SimpleperfExampleWithNative",
692 def setUpClass(cls): argument
693 cls.prepare("SimpleperfExampleWithNative",
701 def setUpClass(cls): argument
702 cls.prepare("SimpleperfExampleOfKotlin",
765 def setUpClass(cls): argument
766 cls.prepare("SimpleperfExampleOfKotlin",
777 def setUpClass(cls): argument
778 cls.prepare("SimpleperfExampleOfKotlin",