blob: c8b47be70d9eea11a170dde37eac0c8c7d5ee374 [file] [log] [blame]
# Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import common, os
from autotest_lib.client.bin import utils
version = 2
def setup(top_dir):
dst_bin = top_dir + '/glmark2'
dst_data = top_dir + '/data'
# Avoid writing on subsequent setup() calls
if (os.path.exists(dst_bin)):
# Look for an executable installed by app-benchmarks/glmark2
for exe in 'glmark2', 'glmark2-es2', 'glmark2-waffle':
src_bin = os.environ['SYSROOT'] + '/usr/bin/' + exe
if os.path.exists(src_bin):
# TODO: throw an exception here?
src_data = os.environ['SYSROOT'] + '/usr/share/glmark2''cp %s %s' % (src_bin, dst_bin))
# Copy glmark2 models, shaders and textures'cp -R %s %s' % (src_data, dst_data))
pwd = os.getcwd()
utils.update_version(pwd + '/src', False, version, setup, pwd)