1 |
--- tests/test.sh.orig 2015-12-27 22:40:35 UTC |
2 |
+++ tests/test.sh |
3 |
@@ -5,14 +5,6 @@ set -e |
4 |
exec 4>&1 |
5 |
exec 1>&2 |
6 |
|
7 |
-cd .. |
8 |
-make clean || true |
9 |
-sh autogen.sh |
10 |
-./configure --prefix="`pwd`/tests" --enable-shared --disable-static "$@" |
11 |
-make |
12 |
-make install |
13 |
-cd tests |
14 |
- |
15 |
rm -rf html |
16 |
rm -f *.dds |
17 |
mkdir html |
18 |
@@ -143,10 +135,9 @@ html_end() |
19 |
|
20 |
timing() |
21 |
{ |
22 |
- t0=`date +%s%N` |
23 |
- "$@" |
24 |
- t1=`date +%s%N` |
25 |
- deltatime_raw=`echo "$t1 - $t0" | bc` |
26 |
+ /usr/bin/time -p -o timing.log "$@" |
27 |
+ t=`cat timing.log | head -n 1 | cut -f 2 -d ' '` |
28 |
+ deltatime_raw=`echo "$t * 1000000000" | bc` |
29 |
deltatime=`echo "scale=3; $deltatime_raw / 1000000000" | bc -l` |
30 |
deltatime=" ($deltatime seconds)" |
31 |
} |
32 |
@@ -197,7 +188,7 @@ xon textures/facility114x/misc/lift02.tg |
33 |
# sunset: GPLv2+ |
34 |
xon env/distant_sunset/distant_sunset_rt.jpg sunset.tga |
35 |
|
36 |
-export LD_LIBRARY_PATH="$PWD/lib" |
37 |
+export LD_LIBRARY_PATH="$PWD/../.libs" |
38 |
for i in dxtfail floor_tread01_norm fract001 base_concrete1a disabled lift02 sunset noise noise_solid supernova; do |
39 |
html_rowstart "$i" |
40 |
|
41 |
@@ -228,21 +219,21 @@ for i in dxtfail floor_tread01_norm frac |
42 |
if $use_nvcompress; then |
43 |
timing nvcompress $nvopts "$i".tga "$i"-nvcompress.dds |
44 |
html "$i"-nvcompress.dds |
45 |
- timing bin/s2tc_from_s3tc -i "$i"-nvcompress.dds -o "$i"-nvcompress-s2tc.dds |
46 |
+ timing ../s2tc_from_s3tc -i "$i"-nvcompress.dds -o "$i"-nvcompress-s2tc.dds |
47 |
html "$i"-nvcompress-s2tc.dds |
48 |
fi |
49 |
|
50 |
S2TC_DITHER_MODE=FLOYDSTEINBERG S2TC_COLORDIST_MODE=$goodmetric S2TC_RANDOM_COLORS=32 S2TC_REFINE_COLORS=LOOP \ |
51 |
- t "$i".tga "$i"-rand32-mrgb-l.dds bin/s2tc_compress -t $fourcc |
52 |
+ t "$i".tga "$i"-rand32-mrgb-l.dds ../s2tc_compress -t $fourcc |
53 |
if $use_libtxc_dxtn; then |
54 |
t "$i".tga "$i"-libtxc_dxtn.dds bin/s2tc_compress -t $fourcc -l /usr/lib/libtxc_dxtn.so |
55 |
timing bin/s2tc_from_s3tc -i "$i"-libtxc_dxtn.dds -o "$i"-libtxc_dxtn-s2tc.dds |
56 |
html "$i"-libtxc_dxtn-s2tc.dds |
57 |
fi |
58 |
S2TC_DITHER_MODE=SIMPLE S2TC_COLORDIST_MODE=WAVG S2TC_RANDOM_COLORS=-1 S2TC_REFINE_COLORS=ALWAYS \ |
59 |
- t "$i".tga "$i"-faster-wavg-r.dds bin/s2tc_compress -t $fourcc |
60 |
+ t "$i".tga "$i"-faster-wavg-r.dds ../s2tc_compress -t $fourcc |
61 |
S2TC_DITHER_MODE=SIMPLE S2TC_COLORDIST_MODE=WAVG S2TC_RANDOM_COLORS=-1 S2TC_REFINE_COLORS=LOOP \ |
62 |
- t "$i".tga "$i"-faster-wavg-l.dds bin/s2tc_compress -t $fourcc |
63 |
+ t "$i".tga "$i"-faster-wavg-l.dds ../s2tc_compress -t $fourcc |
64 |
|
65 |
html_rowend |
66 |
done |