From f06424172d147bc444cf4f0c95ff3d92864d5f88 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 15 Jun 2016 19:01:59 +0300 Subject: Add scripts for test separate file with gcc/deheader. --- build/testfile.sh | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ build/testfiledye.sh | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ build/testfiletest.sh | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 183 insertions(+) create mode 100755 build/testfile.sh create mode 100755 build/testfiledye.sh create mode 100755 build/testfiletest.sh (limited to 'build') diff --git a/build/testfile.sh b/build/testfile.sh new file mode 100755 index 000000000..bfe57c9b1 --- /dev/null +++ b/build/testfile.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +cd ../src + +export includes="-I. -I/usr/include -I/usr/include/SDL -I/usr/include/libxml2" +export LOGFILE="../build/testfile.log" + +function run { + export CXX="g++-5" + + export CMD="$CXX -c $1 $2 $3" + echo $CMD >>${LOGFILE} + $CMD 2>>${LOGFILE} + + export CMD="$CXX -c -std=gnu++1z $1 $2 $3" + $CMD 2>>${LOGFILE} + + ../../deheader/deheader -q -i "\"debug.h\"" \ + -i "\"utils/checkutils.h\"" \ + -i "\"utils/sdlcheckutils.h\"" \ + -i "\"sdlshared.h\"" \ + -i "\"localconsts.h\"" \ + -i "\"utils/fuzzer.h\"" \ + -i "\"utils/physfscheckutils.h\"" \ + -i "\"$name\"" \ + -c "$CXX" \ + -d "$1" \ + -s "-std=gnu++1z" \ + -m "-c -Werror -Wall -Wextra -Wundef -Wmissing-declarations -DLOCALEDIR=\\\"\\\" $2" $3 \ + | grep -v "portability requires" >> ${LOGFILE} + + echo ---------------------------- >>${LOGFILE} +} + +echo >${LOGFILE} + +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_OPENGL" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DENABLE_NLS" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DTMWA_SUPPORT" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DTMWA_SUPPORT -DUSE_OPENGL" "$includes" "$1" + +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_OPENGL" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DENABLE_NLS" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DTMWA_SUPPORT" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DTMWA_SUPPORT -DUSE_OPENGL" "$includes" "$1" + +export includes="-I. -I/usr/include -I/usr/include/SDL2 -I/usr/include/libxml2" + +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DUSE_OPENGL" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DENABLE_NLS" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DTMWA_SUPPORT" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DTMWA_SUPPORT -DUSE_OPENGL" "$includes" "$1" + +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DUSE_OPENGL" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DENABLE_NLS" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DTMWA_SUPPORT" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DTMWA_SUPPORT -DUSE_OPENGL" "$includes" "$1" diff --git a/build/testfiledye.sh b/build/testfiledye.sh new file mode 100755 index 000000000..55a6c97a0 --- /dev/null +++ b/build/testfiledye.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +cd ../src + +export includes="-I. -I/usr/include -I/usr/include/SDL -I/usr/include/libxml2" +export LOGFILE="../build/testfile.log" + +function run { + export CXX="g++-5" + + export CMD="$CXX -c $1 $2 $3" + echo $CMD >>${LOGFILE} + $CMD 2>>${LOGFILE} + + export CMD="$CXX -c -std=gnu++1z $1 $2 $3" + $CMD 2>>${LOGFILE} + + ../../deheader/deheader -q -i "\"debug.h\"" \ + -i "\"utils/checkutils.h\"" \ + -i "\"utils/sdlcheckutils.h\"" \ + -i "\"sdlshared.h\"" \ + -i "\"localconsts.h\"" \ + -i "\"utils/fuzzer.h\"" \ + -i "\"utils/physfscheckutils.h\"" \ + -i "\"$name\"" \ + -c "$CXX" \ + -d "$1" \ + -s "-std=gnu++1z" \ + -m "-c -Werror -Wall -Wextra -Wundef -Wmissing-declarations -DLOCALEDIR=\\\"\\\" $2" $3 \ + | grep -v "portability requires" >> ${LOGFILE} + + echo ---------------------------- >>${LOGFILE} +} + +echo >${LOGFILE} + +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DDYECMD" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_OPENGL -DDYECMD" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DENABLE_NLS -DDYECMD" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DTMWA_SUPPORT -DDYECMD" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DTMWA_SUPPORT -DUSE_OPENGL -DDYECMD" "$includes" "$1" + +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DDYECMD" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_OPENGL -DDYECMD" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DENABLE_NLS -DDYECMD" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DTMWA_SUPPORT -DDYECMD" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DTMWA_SUPPORT -DUSE_OPENGL -DDYECMD" "$includes" "$1" + +export includes="-I. -I/usr/include -I/usr/include/SDL2 -I/usr/include/libxml2" + +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DDYECMD" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DUSE_OPENGL -DDYECMD" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DENABLE_NLS -DDYECMD" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DTMWA_SUPPORT -DDYECMD" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DTMWA_SUPPORT -DUSE_OPENGL -DDYECMD" "$includes" "$1" + +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DDYECMD" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DUSE_OPENGL -DDYECMD" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DENABLE_NLS -DDYECMD" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DTMWA_SUPPORT -DDYECMD" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DTMWA_SUPPORT -DUSE_OPENGL -DDYECMD" "$includes" "$1" diff --git a/build/testfiletest.sh b/build/testfiletest.sh new file mode 100755 index 000000000..9ae673a06 --- /dev/null +++ b/build/testfiletest.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +cd ../src + +export includes="-I. -I/usr/include -I/usr/include/SDL -I/usr/include/libxml2" +export LOGFILE="../build/testfile.log" + +function run { + export CXX="g++-5" + + export CMD="$CXX -c $1 $2 $3" + echo $CMD >>${LOGFILE} + $CMD 2>>${LOGFILE} + + export CMD="$CXX -c -std=gnu++1z $1 $2 $3" + $CMD 2>>${LOGFILE} + + ../../deheader/deheader -q -i "\"debug.h\"" \ + -i "\"utils/checkutils.h\"" \ + -i "\"utils/sdlcheckutils.h\"" \ + -i "\"sdlshared.h\"" \ + -i "\"localconsts.h\"" \ + -i "\"utils/fuzzer.h\"" \ + -i "\"utils/physfscheckutils.h\"" \ + -i "\"$name\"" \ + -c "$CXX" \ + -d "$1" \ + -s "-std=gnu++1z" \ + -m "-c -Werror -Wall -Wextra -Wundef -Wmissing-declarations -DLOCALEDIR=\\\"\\\" $2" $3 \ + | grep -v "portability requires" >> ${LOGFILE} + + echo ---------------------------- >>${LOGFILE} +} + +echo >${LOGFILE} + +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUNITTESTS" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_OPENGL -DUNITTESTS" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DENABLE_NLS -DUNITTESTS" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DTMWA_SUPPORT -DUNITTESTS" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DTMWA_SUPPORT -DUSE_OPENGL -DUNITTESTS" "$includes" "$1" + +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUNITTESTS" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_OPENGL -DUNITTESTS" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DENABLE_NLS -DUNITTESTS" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DTMWA_SUPPORT -DUNITTESTS" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DTMWA_SUPPORT -DUSE_OPENGL -DUNITTESTS" "$includes" "$1" + +export includes="-I. -I/usr/include -I/usr/include/SDL2 -I/usr/include/libxml2" + +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DUNITTESTS" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DUSE_OPENGL -DUNITTESTS" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DENABLE_NLS -DUNITTESTS" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DTMWA_SUPPORT -DUNITTESTS" "$includes" "$1" +run "-DENABLE_LIBXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DTMWA_SUPPORT -DUSE_OPENGL -DUNITTESTS" "$includes" "$1" + +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DUNITTESTS" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DUSE_OPENGL -DUNITTESTS" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DENABLE_NLS -DUNITTESTS" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DTMWA_SUPPORT -DUNITTESTS" "$includes" "$1" +run "-DENABLE_PUGIXML -DDEBUGBUILD -DEATHENA_SUPPORT -DUSE_SDL2 -DTMWA_SUPPORT -DUSE_OPENGL -DUNITTESTS" "$includes" "$1" -- cgit v1.2.3-70-g09d2