__init__.py revision 30939cc99bf6803d7ce18e5d9e07958caa4eb4fd
1# SPDX-License-Identifier: Apache-2.0
2#
3# Copyright (C) 2015, ARM Limited and contributors.
4#
5# Licensed under the Apache License, Version 2.0 (the "License"); you may
6# not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17
18"""Initialization for Android module"""
19
20from screen import Screen
21from system import System
22from workload import Workload
23from viewer import ViewerWorkload
24from benchmark import LisaBenchmark
25
26# Initialization of Android Workloads
27import os
28import sys
29
30from glob import glob
31from importlib import import_module
32
33# Add workloads dir to system path
34workloads_dir = os.path.dirname(os.path.abspath(__file__))
35workloads_dir = os.path.join(workloads_dir, 'workloads')
36sys.path.insert(0, workloads_dir)
37
38for filepath in glob(os.path.join(workloads_dir, '*.py')):
39    filename = os.path.splitext(os.path.basename(filepath))[0]
40    # Ignore __init__ files
41    if filename.startswith('__'):
42        continue
43    # Import workload module
44    import_module(filename)
45