From 38a084fb50cfb38570d0194bb076805e4f752c99 Mon Sep 17 00:00:00 2001
From: Dan Liew <daniel.liew@imperial.ac.uk>
Date: Sun, 12 Jan 2014 21:34:59 +0000
Subject: Fixed many tests that make use of the file tool to check a file
 created by KLEE exists. A big difference between DejaGNU and llvm-lit is that
 in DejaGNU the working directory is the test output directory (e.g.
 test/Feature/Output) but in llvm-lit the working directory is the test
 directory (e.g. test/Feature )

To fix this I have used the %T substitution variable for llvm-lit.

I have also improved some tests by using LLVM's FileCheck tool
and removing of hard coded constants for data type size in
some places.

This commit inevitably breaks running the tests under DejaGNU.
Although it is possible to hack by introducing the %T substitution
variable some tests would still be broken because the use of shell
pipes in DejaGNU doesn't seem to work properly. I could work around
this but it's really not worth the effort.
---
 test/Feature/OverlappedError.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'test/Feature/OverlappedError.c')

diff --git a/test/Feature/OverlappedError.c b/test/Feature/OverlappedError.c
index aa220ed9..886c7ec8 100644
--- a/test/Feature/OverlappedError.c
+++ b/test/Feature/OverlappedError.c
@@ -1,7 +1,7 @@
 // RUN: %llvmgcc %s -g -emit-llvm -O0 -c -o %t1.bc
 // RUN: %klee %t1.bc
-// RUN: ls klee-last/ | grep .ktest | wc -l | grep 4
-// RUN: ls klee-last/ | grep .ptr.err | wc -l | grep 2
+// RUN: ls %T/klee-last/ | grep .ktest | wc -l | grep 4
+// RUN: ls %T/klee-last/ | grep .ptr.err | wc -l | grep 2
 
 #include <stdlib.h>
 
-- 
cgit 1.4.1