[Intel-gfx] [PATCH 01/23] piglit: Add a script to synchronise the piglit test runner

Damien Lespiau damien.lespiau at intel.com
Fri Nov 15 17:33:18 CET 2013


The goal is to to remove the need to clone and compile piglit to run a
piglit enabled igt. Compiling piglit is not actually needed and we can
just grab the python files from a reference checktout.

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 piglit/sync-from-piglit | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100755 piglit/sync-from-piglit

diff --git a/piglit/sync-from-piglit b/piglit/sync-from-piglit
new file mode 100755
index 0000000..20a95ff
--- /dev/null
+++ b/piglit/sync-from-piglit
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+PIGLIT_DIR=$1
+BASE_DIR="$(cd "$(dirname "$0")"; pwd -P)"
+EXCLUDE_FILE="$BASE_DIR/sync-exclude"
+
+[ -z "$PIGLIT_DIR" ] && {
+	echo "Error: You must specify the piglit directory to sync from"
+	exit 1
+}
+
+cat <<EOF > $EXCLUDE_FILE
+tests
+*.pyc
+*_test.py
+EOF
+
+rsync -rtv --exclude-from $EXCLUDE_FILE	\
+	$PIGLIT_DIR/framework		\
+	$PIGLIT_DIR/templates		\
+	$PIGLIT_DIR/piglit-*.py		\
+	$BASE_DIR
+
+rm -f $EXCLUDE_FILE
-- 
1.8.3.1




More information about the Intel-gfx mailing list