Esempio n. 1
0
def examples_work(env):
    """External entry point for non-command line invocations.
    Initialize the environment, build libxed, the examples, the kit
    and run the tests"""
    xbc.prep(env)
    verify_args(env)
    start_time = mbuild.get_time()
    xbc.init_once(env)

    init(env)

    if 'clean' in env['targets'] or env['clean']:
        xbc.xed_remove_files_glob(env)
        if len(env['targets']) <= 1:
            xbc.cexit(0)

    mbuild.cmkdir(env['build_dir'])

    work_queue = mbuild.work_queue_t(env['jobs'])

    xbc.get_libxed_names(env, work_queue)
    retval = build_examples(env, work_queue)
    end_time = mbuild.get_time()
    mbuild.msgb("EXAMPLES BUILD ELAPSED TIME",
                mbuild.get_elapsed_time(start_time, end_time))
    return retval
Esempio n. 2
0
#!/usr/bin/env python
#BEGIN_LEGAL
#
#Copyright (c) 2016 Intel Corporation
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#
#END_LEGAL

import find
import mbuild
print mbuild.get_elapsed_time(10, 0)
Esempio n. 3
0
#!/usr/bin/env python
#BEGIN_LEGAL
#
#Copyright (c) 2016 Intel Corporation
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#
#END_LEGAL
from __future__ import print_function
import find
import mbuild
print(mbuild.get_elapsed_time(10, 0))
Esempio n. 4
0
sys.path = [find_dir('mbuild')] + sys.path

def dirname_n(s,n):
    t = s
    for i in range(0,n):
        t = os.path.dirname(t)
    return t

import mbuild
start_time=mbuild.get_time()

env = mbuild.env_t()
env.parse_args()
work_queue = mbuild.work_queue_t(env['jobs'])


cmds= ['obj/xed -64 -i /bin/ls > ls.out',
       'obj/xed -n 10m -v 0 -64 -i /usr/X11R6/bin/Xvnc ' ]
for cmd in cmds:
    c = mbuild.command_t(cmd)
    work_queue.add(c)

phase = "XED2-TESTS"
okay = work_queue.build()
if not okay:
    mbuild.die("[%s]  failed" % (phase))
mbuild.msgb(phase, "succeeded")

end_time=mbuild.get_time()
mbuild.msgb("ELAPSED TIME", mbuild.get_elapsed_time(start_time,end_time))