Index: tools/fiddle/fiddle_test |
diff --git a/tools/fiddle/fiddle_test b/tools/fiddle/fiddle_test |
index 2b5349583f4e6237728ab3f62d4f02679d459d22..19d97a9fda6fdd9bd2cc761c62b9182baf5f5331 100755 |
--- a/tools/fiddle/fiddle_test |
+++ b/tools/fiddle/fiddle_test |
@@ -18,18 +18,31 @@ if ! command -v cmake > /dev/null 2>&1 ; then |
cores=32 |
echo "Bootstrapping CMake" |
cmake_dir="${skia_dir}/third_party/externals/cmake" |
- cd "$cmake_dir" |
- ./bootstrap --parallel=$cores |
- make -j $cores cmake |
+ ( |
+ cd "$cmake_dir" |
+ ./bootstrap --parallel=$cores |
+ make -j $cores cmake |
+ ) |
export PATH="${cmake_dir}/bin:${PATH}" |
fi |
echo "Building Skia and Fiddle" |
+( |
+ cd "${skia_dir}/cmake" |
+ cmake -G Ninja . |
+ ninja skia |
+) |
+ |
+tmp=$(mktemp -d "${TMPDIR:-/tmp}/fiddle_test.XXXXXXXXXX") |
+ |
cd "$fiddle_dir" |
-git clean -fxd . |
-go build fiddler.go |
-./fiddler "$skia_dir" |
-./fiddler "$skia_dir" draw.cpp > /dev/null |
-echo "cleaning up" |
-git clean -fxd . |
+${CXX:-c++} \ |
+ "@../../cmake/skia_compile_arguments.txt" \ |
+ -o "${tmp}/fiddle" \ |
+ "fiddle_main.cpp" \ |
+ "draw.cpp" \ |
+ -lOSMesa \ |
+ "@../../cmake/skia_link_arguments.txt" |
+ |
+"${tmp}/fiddle" | sha1sum |