Building test programs

Rust 1.12 发布了。

Building test programs

The test framework has been designed with portability in mind. The only
mandatory requirements are full C++ support and standard system
libraries for I/O, threads and sockets.

Rust 是 Mozilla 的一个新的编程语言,由web语言的领军人物Brendan
Eich(js之父),Dave Herman以及Mozilla公司的Graydon Hoare 合力开发。

CMake build system

The deqp sources have build scripts for CMake, which is the preferred
tool for compiling the test programs.

CMake is an open source build system that supports multiple platforms
and toolchains. CMake generates native makefiles or IDE project files
from target-independent configuration files. For more information on
CMake, please see the

澳门新葡亰游戏网址,CMake supports and recommends out-of-source-tree builds, i.e., you
should always create makefiles or project files in a separate build
directory outside the source tree. CMake does not have any kind of
“distclean” target, so removing any files generated by CMake must be
done manually.

Configuration options are given to CMake using -D<OPTION_NAME>=<VALUE>
syntax. Some commonly used options for deqp are listed below.

Configuration option Description

Target name, for example: "android"

The deqp CMake scripts will include the file targets/<DEQP_TARGET>/<DEQP_TARGET>.cmake and expect to find target-specific build options from there.


Path to toolchain file for CMake. Used for cross compilation.


Build type for makefile targets. Valid values are: "Debug" and "Release"

Note the interpretation and default type depend on the targeted build system. See the CMake documentation for details.


Creating a target build file

The deqp build system is configured for new targets using target build
files. A target build file defines which features the platform supports
and what libraries or additional include paths are required. Target file
names follow the targets/<name>/<name>.cmake format and the target is
selected using the DEQP_TARGET build parameter.

File paths in target files are relative to the base deqp directory,
not the targets/<name> directory. The following standard variables can
be set by target build file.

Variable Description

Target name (will be included into test logs)


Whether GLES2 is supported (default: OFF)


GLES2 libraries (leave empty if not supported or dynamic loading is used)


Whether GLES3.x is supported (default: OFF)


GLES3.x libraries (leave empty if not supported or dynamic loading is used)


Whether OpenVG is supported (default: OFF)


OpenVG libraries (leave empty if not supported or dynamic loading is used)


Whether EGL is supported (default: OFF)


EGL libraries (leave empty if not supported or dynamic loading is used)


Additional platform-specific libraries required for linking


List of libraries that are copied to each test binary build directory. Can be used to copy libraries that are needed for running tests but are not in default search path.


Platform port source list. Default sources are determined based on the capabilities and OS.

Note: Paths are relative to: framework/platform

The target build file can add additional include or link paths using the
include_directories() and link_directories() CMake functions.

  • Many minor improvements to the documentation.

  • rustc supports three new MUSL targets on
    ARM:arm-unknown-linux-musleabi, arm-unknown-linux-musleabihf,
    These targets produce statically-linked binaries. There are no
    binary release builds yet though.

  • In error
    and unknown numeric
    types have more
    human-friendly errors.

  • The compiler can now be built against LLVM

  • Test binaries now support a --test-threads argument to specify
    the number of threads used to run tests, and which acts the same as
    theRUST_TEST_THREADS environment

  • The test runner now emits a warning when tests run over 60

  • Rust releases now come with source packages that can be installed
    by rustup via
    rustup component add rust-src.
    The resulting source code can be used by tools and IDES, located in
    the sysroot under lib/rustlib/src.

Win32 build

The easiest way to build deqp modules for Windows is to use the CMake
build system. You will need CMake 2.6.12 or newer and the Microsoft
Visual C/C++ compiler. The deqp has been tested with Visual Studio 2013.

Visual Studio project files can be generated with the following command:

cmake pathtosrcdeqp -G "Visual Studio 12"

A 64-bit build can be made by selecting “Visual Studio <ver>
Win64” as the build generator:

cmake pathtosrcdeqp -G "Visual Studio 12 Win64"

You can also generate NMake makefiles with the -G "NMake Makefiles"
option as well as the build type (-DCMAKE_BUILD_TYPE="Debug" or


Rendering context creation

Rendering context can be created either with WGL or with EGL on Windows.


WGL support

All Win32 binaries support GL context creation with WGL as it requires
only standard libraries. WGL context can be selected using the
--deqp-gl-context-type=wgl command line argument. In the WGL mode, the
deqp uses the WGL_EXT_create_context_es_profile extension to create
OpenGL ES contexts. This has been tested to work with latest drivers
from NVIDIA and Intel. AMD drivers do not support the required