Add new test-driver script, run_tests.py.

Old run_tests.sh still lives (for now).
Changes include:
- Tests are run in parallel across all of the available CPU cores
- Option to create a statically-linked executable for each test
  (rather than using the LLVM JIT).  This is in particular useful
  for AVX, which doesn't have good JIT support yet.
- Static executables also makes it possible to test x86, not
  just x86-64, codegen.
- Fixed a number of tests in failing_tests, which were actually
  failing due to the fact that the expected function signature of
  tests had changed.
This commit is contained in:
Matt Pharr
2011-08-29 14:15:09 -07:00
parent 33feeffe5d
commit 58e34ba4ae
9 changed files with 383 additions and 86 deletions

View File

@@ -1,19 +1,14 @@
static float float4(uniform float a, uniform float b, uniform float c,
uniform float d) {
float ret = 0;
for (uniform int i = 0; i < programCount; i += 4) {
ret = insert(ret, i + 0, a);
ret = insert(ret, i + 1, b);
ret = insert(ret, i + 2, c);
ret = insert(ret, i + 3, d);
}
return ret;
export uniform int width() { return programCount; }
export void f_f(uniform float r[], uniform float a[]) {
unsigned int i = (unsigned int)a[programIndex];
r[programIndex] = max((unsigned int)2, i);
}
export float f_f(float a) {
unsigned int i = (unsigned int)a;
return max((unsigned int)2, i);
export void result(uniform float r[]) {
r[programIndex] = 1+programIndex;
r[0] = 2;
}
export float result() { return float4(2,2,3,4); }