зеркало из https://github.com/stride3d/xkslang.git
glslang tests: Track accumulative success/fail result. Contributed by Lei Zhang (antiagainst@google.com).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31207 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
Родитель
98e9964d79
Коммит
b38c969e34
|
@ -3,6 +3,7 @@
|
||||||
TARGETDIR=localResults
|
TARGETDIR=localResults
|
||||||
BASEDIR=baseResults
|
BASEDIR=baseResults
|
||||||
EXE=../build/install/bin/glslangValidator
|
EXE=../build/install/bin/glslangValidator
|
||||||
|
HASERROR=0
|
||||||
mkdir -p localResults
|
mkdir -p localResults
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -10,11 +11,11 @@ mkdir -p localResults
|
||||||
#
|
#
|
||||||
echo running configuration file test
|
echo running configuration file test
|
||||||
$EXE -c > $TARGETDIR/test.conf
|
$EXE -c > $TARGETDIR/test.conf
|
||||||
diff -b $BASEDIR/test.conf $TARGETDIR/test.conf
|
diff -b $BASEDIR/test.conf $TARGETDIR/test.conf || HASERROR=1
|
||||||
$EXE -i -l $TARGETDIR/test.conf specExamples.vert > $TARGETDIR/specExamples.vert.out
|
$EXE -i -l $TARGETDIR/test.conf specExamples.vert > $TARGETDIR/specExamples.vert.out
|
||||||
diff -b $BASEDIR/specExamples.vert.out $TARGETDIR
|
diff -b $BASEDIR/specExamples.vert.out $TARGETDIR || HASERROR=1
|
||||||
$EXE 100Limits.vert 100.conf > $TARGETDIR/100LimitsConf.vert.out
|
$EXE 100Limits.vert 100.conf > $TARGETDIR/100LimitsConf.vert.out
|
||||||
diff -b $BASEDIR/100LimitsConf.vert.out $TARGETDIR/100LimitsConf.vert.out
|
diff -b $BASEDIR/100LimitsConf.vert.out $TARGETDIR/100LimitsConf.vert.out || HASERROR=1
|
||||||
|
|
||||||
#
|
#
|
||||||
# isolated compilation tests
|
# isolated compilation tests
|
||||||
|
@ -23,7 +24,7 @@ while read t; do
|
||||||
echo Running $t...
|
echo Running $t...
|
||||||
b=`basename $t`
|
b=`basename $t`
|
||||||
$EXE -i -l $t > $TARGETDIR/$b.out
|
$EXE -i -l $t > $TARGETDIR/$b.out
|
||||||
diff -b $BASEDIR/$b.out $TARGETDIR/$b.out
|
diff -b $BASEDIR/$b.out $TARGETDIR/$b.out || HASERROR=1
|
||||||
done < testlist
|
done < testlist
|
||||||
|
|
||||||
if [ -a localtestlist ]
|
if [ -a localtestlist ]
|
||||||
|
@ -32,7 +33,7 @@ if [ -a localtestlist ]
|
||||||
echo Running $t...
|
echo Running $t...
|
||||||
b=`basename $t`
|
b=`basename $t`
|
||||||
$EXE -i -l $t > $TARGETDIR/$b.out
|
$EXE -i -l $t > $TARGETDIR/$b.out
|
||||||
diff -b $BASEDIR/$b.out $TARGETDIR/$b.out
|
diff -b $BASEDIR/$b.out $TARGETDIR/$b.out || HASERROR=1
|
||||||
done < localtestlist
|
done < localtestlist
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -43,7 +44,7 @@ grep -v "^#" test-spirv-list | while read t; do
|
||||||
echo Running SPIR-V $t...
|
echo Running SPIR-V $t...
|
||||||
b=`basename $t`
|
b=`basename $t`
|
||||||
$EXE -H $t > $TARGETDIR/$b.out
|
$EXE -H $t > $TARGETDIR/$b.out
|
||||||
diff -b $BASEDIR/$b.out $TARGETDIR/$b.out
|
diff -b $BASEDIR/$b.out $TARGETDIR/$b.out || HASERROR=1
|
||||||
done
|
done
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -52,7 +53,7 @@ done
|
||||||
function runBulkTest {
|
function runBulkTest {
|
||||||
echo Running $*...
|
echo Running $*...
|
||||||
$EXE -i -l -t $* > $TARGETDIR/$1.out
|
$EXE -i -l -t $* > $TARGETDIR/$1.out
|
||||||
diff -b $BASEDIR/$1.out $TARGETDIR/$1.out
|
diff -b $BASEDIR/$1.out $TARGETDIR/$1.out || HASERROR=1
|
||||||
}
|
}
|
||||||
|
|
||||||
runBulkTest mains1.frag mains2.frag noMain1.geom noMain2.geom
|
runBulkTest mains1.frag mains2.frag noMain1.geom noMain2.geom
|
||||||
|
@ -70,7 +71,7 @@ runBulkTest 150.tesc 150.tese 400.tesc 400.tese 410.tesc 420.tesc 420.tese
|
||||||
#
|
#
|
||||||
echo Running reflection...
|
echo Running reflection...
|
||||||
$EXE -l -q reflection.vert > $TARGETDIR/reflection.vert.out
|
$EXE -l -q reflection.vert > $TARGETDIR/reflection.vert.out
|
||||||
diff -b $BASEDIR/reflection.vert.out $TARGETDIR/reflection.vert.out
|
diff -b $BASEDIR/reflection.vert.out $TARGETDIR/reflection.vert.out || HASERROR=1
|
||||||
|
|
||||||
#
|
#
|
||||||
# multi-threaded test
|
# multi-threaded test
|
||||||
|
@ -78,4 +79,6 @@ diff -b $BASEDIR/reflection.vert.out $TARGETDIR/reflection.vert.out
|
||||||
echo Comparing single thread to multithread for all tests in current directory...
|
echo Comparing single thread to multithread for all tests in current directory...
|
||||||
$EXE -i *.vert *.geom *.frag *.tes* *.comp > singleThread.out
|
$EXE -i *.vert *.geom *.frag *.tes* *.comp > singleThread.out
|
||||||
$EXE -i *.vert *.geom *.frag *.tes* *.comp -t > multiThread.out
|
$EXE -i *.vert *.geom *.frag *.tes* *.comp -t > multiThread.out
|
||||||
diff singleThread.out multiThread.out
|
diff singleThread.out multiThread.out || HASERROR=1
|
||||||
|
|
||||||
|
exit $HASERROR
|
||||||
|
|
Загрузка…
Ссылка в новой задаче