forked from ddemidov/vexcl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_n_test
executable file
·34 lines (28 loc) · 1.12 KB
/
build_n_test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Builds everything within all configured build directories and runs the tests
# under given OpenCL and CUDA platforms.
# Stop on errors:
#set -e
# Build with every possible compiler:
for compiler in build-cl-*; do
ninja -C ${compiler}
platforms=$(${compiler}/examples/devlist | grep CL_PLATFORM_NAME | sed 's/.*= \(\w*\).*/\1/' | sort -u)
# and run the tests for each OpenCL platform:
for platform in ${platforms}; do
echo
echo "----------------------------------------------------------------------"
echo "OCL_PLATFORM=${platform} compiler=${compiler}"
echo "----------------------------------------------------------------------"
echo
OCL_PLATFORM=${platform} ninja -C ${compiler} test
done
done
# Run tests for CUDA backend built with every possible compiler:
for compiler in build-cu-*; do
echo
echo "----------------------------------------------------------------------"
echo "CUDA backend; compiler=${compiler}"
echo "----------------------------------------------------------------------"
echo
ninja -C ${compiler} all test
done