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

Side by Side Diff: client/deps/piglit/piglit.py

Issue 6745001: Add piglit autotest (Closed) Base URL: ssh://gitrw.chromium.org:9222/autotest.git@master
Patch Set: Logging command Created 9 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 #!/usr/bin/python
2
3 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 import os, shutil, re
DaleCurtis 2011/04/08 16:58:18 alphabetize imports.
ilja 2011/04/08 21:42:24 Done.
ilja 2011/04/08 21:42:24 Done.
8 from autotest_lib.client.bin import utils
9
10 version = 3
11
12 def setup(topdir):
13 sysroot = os.environ['SYSROOT']
14 # IHF: piglit only builds on x86 right (Tegra2 only supporting GLES)
DaleCurtis 2011/04/08 16:58:18 # TODO(ihf): ...
ilja 2011/04/08 21:42:24 Done.
15 print ('INFO: piglit sysroot = ' + sysroot)
DaleCurtis 2011/04/08 16:58:18 use logging not print.
16 tarball = 'piglit.tar.gz'
17 srcdir = os.path.join(topdir, 'src')
18 tarball_path = os.path.join(srcdir, tarball)
19 dst_path = os.path.join(topdir, 'piglit')
20 # in-source build, clean/overwrite destination
21 shutil.rmtree(dst_path, ignore_errors=True)
22 if re.search('x86', sysroot.lower()):
23 utils.extract_tarball_to_dir(tarball_path, dst_path)
24 # patch in a single config file for now
25 shutil.copyfile(os.path.join(srcdir, 'cros-driver.tests'),
26 os.path.join(dst_path, 'tests/cros-driver.tests'))
27 os.chdir(dst_path)
28 # we have to tell cmake where to find glut
29 cmd = 'cmake -DCMAKE_FIND_ROOT_PATH=' + sysroot
30 cmd = cmd + ' -DGLUT_INCLUDE_DIR=' + sysroot + '/usr/include'
31 cmd = cmd + ' -DGLUT_glut_LIBRARY=' + sysroot + '/usr/lib/libglut.so'
32 utils.run(cmd)
33 utils.make('-j %d' % utils.count_cpus())
34 os.chdir(topdir)
35 else:
36 print 'WARNING: Skipping piglit build. piglit needs OpenGL (x86 boards)'
DaleCurtis 2011/04/08 16:58:18 Logging.
ilja 2011/04/08 21:42:24 Done.
37 dst_path = os.path.join(topdir, 'piglit')
38 # still create an empty directory
39 if not os.path.exists(dst_path):
40 os.makedirs(dst_path)
41
42 pwd = os.getcwd()
43 utils.update_version(pwd + '/src', True, version, setup, pwd)
44
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698