Merge branch 'master-merge' into qbsp-use-common
This commit is contained in:
commit
27f391d27c
|
|
@ -5,3 +5,11 @@ build*/
|
|||
CMakeFiles/
|
||||
*.xcodeproj
|
||||
.*/
|
||||
testmaps/*.bsp
|
||||
testmaps/*.log
|
||||
testmaps/*.prt
|
||||
testmaps/*.vis
|
||||
testmaps/quake_map_source/*.bsp
|
||||
testmaps/quake_map_source/*.log
|
||||
testmaps/quake_map_source/*.prt
|
||||
testmaps/quake_map_source/*.vis
|
||||
|
|
|
|||
35
appveyor.yml
35
appveyor.yml
|
|
@ -10,40 +10,7 @@ install:
|
|||
- ps: Invoke-WebRequest 'https://github.com/oneapi-src/oneTBB/releases/download/v2020.2/tbb-2020.2-win.zip' -OutFile 'tbb.zip'
|
||||
- ps: 7z x tbb.zip -oc:\
|
||||
build_script:
|
||||
- ps: >-
|
||||
git submodule update --init --recursive
|
||||
|
||||
$env:Path += ";C:\cygwin64\bin"
|
||||
|
||||
mkdir cmakebuild
|
||||
|
||||
cd cmakebuild
|
||||
|
||||
cmake .. -T v142 -Dembree_DIR="C:\embree-3.12.1.x64.vc14.windows" -DTBB_DIR="C:\tbb\cmake" -DCMAKE_GENERATOR_PLATFORM=x64 -DENABLE_LIGHTPREVIEW=NO -DQt5Widgets_DIR="C:\Qt\5.8\msvc2013_64\lib\cmake\Qt5Widgets"
|
||||
|
||||
$cmakePlatform = "x64"
|
||||
|
||||
msbuild /target:testlight /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" ericw-tools.sln
|
||||
|
||||
if ( $? -eq $false ) {
|
||||
throw "testlight failed to build"
|
||||
}
|
||||
|
||||
msbuild /target:testqbsp /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" ericw-tools.sln
|
||||
|
||||
if ( $? -eq $false ) {
|
||||
throw "testqbsp failed to build"
|
||||
}
|
||||
|
||||
msbuild /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" PACKAGE.vcxproj
|
||||
|
||||
if ( $? -eq $false ) {
|
||||
throw "package failed"
|
||||
}
|
||||
|
||||
.\light\Release\testlight.exe
|
||||
|
||||
.\qbsp\Release\testqbsp.exe
|
||||
- cmd: powershell .\build-appveyor.ps1
|
||||
artifacts:
|
||||
- path: cmakebuild\*.zip
|
||||
deploy:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
git submodule update --init --recursive
|
||||
|
||||
$env:Path += ";C:\cygwin64\bin"
|
||||
|
||||
# For sha256sum
|
||||
$env:Path += ";C:\Program Files\Git\usr\bin"
|
||||
|
||||
mkdir cmakebuild
|
||||
|
||||
cd cmakebuild
|
||||
|
||||
cmake .. -T v142 -Dembree_DIR="C:\embree-3.12.1.x64.vc14.windows" -DTBB_DIR="C:\tbb\cmake" -DCMAKE_GENERATOR_PLATFORM=x64 -DENABLE_LIGHTPREVIEW=NO -DQt5Widgets_DIR="C:\Qt\5.8\msvc2013_64\lib\cmake\Qt5Widgets"
|
||||
|
||||
$cmakePlatform = "x64"
|
||||
|
||||
msbuild /target:testlight /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" ericw-tools.sln
|
||||
|
||||
if ( $? -eq $false ) {
|
||||
throw "testlight failed to build"
|
||||
}
|
||||
|
||||
msbuild /target:testqbsp /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" ericw-tools.sln
|
||||
|
||||
if ( $? -eq $false ) {
|
||||
throw "testqbsp failed to build"
|
||||
}
|
||||
|
||||
msbuild /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" PACKAGE.vcxproj
|
||||
|
||||
if ( $? -eq $false ) {
|
||||
throw "package failed"
|
||||
}
|
||||
|
||||
.\light\Release\testlight.exe
|
||||
|
||||
if ( $? -eq $false ) {
|
||||
throw "testlight failed"
|
||||
}
|
||||
|
||||
.\qbsp\Release\testqbsp.exe
|
||||
|
||||
if ( $? -eq $false ) {
|
||||
throw "testqbsp failed"
|
||||
}
|
||||
|
||||
$env:Path += ";$(pwd)\qbsp\Release;$(pwd)\vis\Release;$(pwd)\light\Release"
|
||||
|
||||
cd ..\testmaps
|
||||
|
||||
. "C:\Program Files\Git\usr\bin\bash.exe" .\automatated_tests.sh
|
||||
|
||||
if ( $LastExitCode -ne 0 ) {
|
||||
throw "automatated_tests.sh failed"
|
||||
}
|
||||
|
|
@ -35,12 +35,8 @@ readelf -d ./light/light
|
|||
unzip -X ericw-tools-*.zip
|
||||
readelf -d ./ericw-tools-*/bin/light
|
||||
|
||||
# coarse tests on real maps (only checks success/failure exit status of tool)
|
||||
# run regression tests
|
||||
cd ..
|
||||
export PATH="$(pwd)/$BUILD_DIR/qbsp:$(pwd)/$BUILD_DIR/light:$PATH"
|
||||
export PATH="$(pwd)/$BUILD_DIR/qbsp:$(pwd)/$BUILD_DIR/light:$(pwd)/$BUILD_DIR/vis:$PATH"
|
||||
cd testmaps
|
||||
./automatated_tests.sh || exit 1
|
||||
|
||||
# test id1 maps for leaks
|
||||
cd quake_map_source
|
||||
./leaktest.sh || exit 1
|
||||
|
|
|
|||
11
build-osx.sh
11
build-osx.sh
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# for sha256sum, used by the tests
|
||||
brew install coreutils
|
||||
|
||||
BUILD_DIR=build-osx
|
||||
EMBREE_ZIP="https://github.com/embree/embree/releases/download/v3.13.0/embree-3.13.0.x86_64.macosx.zip"
|
||||
|
||||
|
|
@ -46,12 +49,8 @@ otool -L ./bsputil/bsputil
|
|||
./light/testlight || exit 1
|
||||
./qbsp/testqbsp || exit 1
|
||||
|
||||
# coarse tests on real maps (only checks success/failure exit status of tool)
|
||||
# run regression tests
|
||||
cd ..
|
||||
export PATH="$(pwd)/$BUILD_DIR/qbsp:$(pwd)/$BUILD_DIR/light:$PATH"
|
||||
export PATH="$(pwd)/$BUILD_DIR/qbsp:$(pwd)/$BUILD_DIR/light:$(pwd)/$BUILD_DIR/vis:$PATH"
|
||||
cd testmaps
|
||||
./automatated_tests.sh || exit 1
|
||||
|
||||
# test id1 maps for leaks
|
||||
cd quake_map_source
|
||||
./leaktest.sh || exit 1
|
||||
|
|
|
|||
|
|
@ -61,14 +61,18 @@ if (embree_FOUND)
|
|||
target_link_libraries (light PRIVATE embree)
|
||||
add_definitions(-DHAVE_EMBREE)
|
||||
|
||||
# macOS/homebrew: hack around find_file applying the .. before resolving the symlink
|
||||
# causing it not to find the LICENSE.txt
|
||||
get_filename_component(embree_DIR_ABS "${embree_DIR}" REALPATH CACHE)
|
||||
|
||||
find_file(EMBREE_LICENSE LICENSE.txt
|
||||
"${embree_DIR}/doc"
|
||||
"${embree_DIR}/../../../doc"
|
||||
"${embree_DIR}/../embree3/embree3" # vcpkg puts it here
|
||||
"${embree_DIR}/../../.." # homebrew puts it here
|
||||
"${embree_DIR_ABS}/doc"
|
||||
"${embree_DIR_ABS}/../../../doc"
|
||||
"${embree_DIR_ABS}/../embree3/embree3" # vcpkg puts it here
|
||||
"${embree_DIR_ABS}/../../.." # homebrew puts it here
|
||||
NO_DEFAULT_PATH)
|
||||
if (EMBREE_LICENSE STREQUAL EMBREE_LICENSE-NOTFOUND)
|
||||
message(WARNING "Couldn't find embree license. embree_DIR is ${embree_DIR}")
|
||||
message(WARNING "Couldn't find embree license. embree_DIR: ${embree_DIR}, embree_DIR_ABS: ${embree_DIR_ABS}")
|
||||
else()
|
||||
message(STATUS "Found embree license: ${EMBREE_LICENSE}")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,7 +1,89 @@
|
|||
#!/bin/bash
|
||||
|
||||
# usage:
|
||||
# ./automated_tests.sh [--update-hashes]
|
||||
#
|
||||
# If --update-hashes is given, updates the expected hash files.
|
||||
# Otherwise tests the generated .bsp's match the expected hashes.
|
||||
#
|
||||
# qbsp, vis, light need to be in PATH before running.
|
||||
#
|
||||
# Returns exit status 1 if any tests failed, otherwise 0
|
||||
|
||||
# print statements as they are executed
|
||||
set -x
|
||||
|
||||
UPDATE_HASHES=0
|
||||
if [[ "$1" == "--update-hashes" ]]; then
|
||||
UPDATE_HASHES=1
|
||||
fi
|
||||
|
||||
# checking for lack of crashes
|
||||
|
||||
qbsp -noverbose invalid_texture_axes.map || exit 1
|
||||
light invalid_texture_axes.map || exit 1
|
||||
|
||||
# hash checks
|
||||
|
||||
# Compiles Quake E1M1 under all supported output formats,
|
||||
# then compare the hashes with what's been committed to the repo.
|
||||
# Then vis all of the bsp's, and check the hashes again.
|
||||
# Then light them, and check the hashes again.
|
||||
#
|
||||
# This check will naturally fail if any changes are made to the
|
||||
# tools that alter the .bsp output - the idea is you would just
|
||||
# regenerate the expected hashes, but check that the .bsp's still
|
||||
# work in game at the same time.
|
||||
|
||||
HASH_CHECK_BSPS="e1m1-bsp29.bsp \
|
||||
e1m1-bsp2.bsp \
|
||||
e1m1-2psb.bsp \
|
||||
e1m1-hexen2.bsp \
|
||||
e1m1-hexen2-bsp2.bsp \
|
||||
e1m1-hexen2-2psb.bsp \
|
||||
e1m1-hlbsp.bsp"
|
||||
|
||||
qbsp -noverbose quake_map_source/E1M1.map e1m1-bsp29.bsp || exit 1
|
||||
qbsp -noverbose -bsp2 quake_map_source/E1M1.map e1m1-bsp2.bsp || exit 1
|
||||
qbsp -noverbose -2psb quake_map_source/E1M1.map e1m1-2psb.bsp || exit 1
|
||||
qbsp -noverbose -hexen2 quake_map_source/E1M1.map e1m1-hexen2.bsp || exit 1
|
||||
qbsp -noverbose -hexen2 -bsp2 quake_map_source/E1M1.map e1m1-hexen2-bsp2.bsp || exit 1
|
||||
qbsp -noverbose -hexen2 -2psb quake_map_source/E1M1.map e1m1-hexen2-2psb.bsp || exit 1
|
||||
qbsp -noverbose -hlbsp quake_map_source/E1M1.map e1m1-hlbsp.bsp || exit 1
|
||||
|
||||
if [[ $UPDATE_HASHES -ne 0 ]]; then
|
||||
sha256sum ${HASH_CHECK_BSPS} > qbsp.sha256sum || exit 1
|
||||
else
|
||||
sha256sum --strict --check qbsp.sha256sum || exit 1
|
||||
fi
|
||||
|
||||
# now run vis
|
||||
# FIXME: vis output is nondeterministic when run with multiple threads!
|
||||
|
||||
for bsp in ${HASH_CHECK_BSPS}; do
|
||||
vis -nostate -threads 1 ${bsp} || exit 1
|
||||
done
|
||||
|
||||
if [[ $UPDATE_HASHES -ne 0 ]]; then
|
||||
sha256sum ${HASH_CHECK_BSPS} > qbsp-vis.sha256sum || exit 1
|
||||
else
|
||||
sha256sum --strict --check qbsp-vis.sha256sum || exit 1
|
||||
fi
|
||||
|
||||
# FIXME: light output is nondeterministic
|
||||
|
||||
# for bsp in ${HASH_CHECK_BSPS}; do
|
||||
# light -threads 1 ${bsp} || exit 1
|
||||
# done
|
||||
|
||||
# if [[ $UPDATE_HASHES -ne 0 ]]; then
|
||||
# sha256sum ${HASH_CHECK_BSPS} > qbsp-vis-light.sha256sum || exit 1
|
||||
# else
|
||||
# sha256sum --strict --check qbsp-vis-light.sha256sum || exit 1
|
||||
# fi
|
||||
|
||||
# leak tests on all id1 maps
|
||||
cd quake_map_source
|
||||
./leaktest.sh || exit 1
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
0
testmaps/make_screenshot.sh → testmaps/deprecated/make_screenshot.sh
Executable file → Normal file
0
testmaps/make_screenshot.sh → testmaps/deprecated/make_screenshot.sh
Executable file → Normal file
0
testmaps/make_screenshots.sh → testmaps/deprecated/make_screenshots.sh
Executable file → Normal file
0
testmaps/make_screenshots.sh → testmaps/deprecated/make_screenshots.sh
Executable file → Normal file
|
|
@ -0,0 +1,7 @@
|
|||
c9683e945bb01528a768653cdb79584dfbc8be6f76b712cbf0d24482a4ae3cc3 *e1m1-bsp29.bsp
|
||||
a8024b07d48abc0553ff3628d6d4cb62138f67808b425b833e5643068231c2e4 *e1m1-bsp2.bsp
|
||||
cb11d4f40d92c9d349fd11f9e4901e9cd9aa82db9971181a615c197f75f4b4a6 *e1m1-2psb.bsp
|
||||
f5656ae5a98b4044568e70a411afe2b37cae41c14f7262f26be2aa45aebc3672 *e1m1-hexen2.bsp
|
||||
4e0fec87702736481d08d67366f300bf351944f0ebcd4daafa56cbfb2f509893 *e1m1-hexen2-bsp2.bsp
|
||||
a5eb5b451baab8db48a141285479669656010fc7d3945e30672d609169b040e5 *e1m1-hexen2-2psb.bsp
|
||||
ecf7a82cfad86c3b8a330645233c17011f77b8fef844130ac85dd6e8972eea8f *e1m1-hlbsp.bsp
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
d289427e3c8a7046dce509a83401f6732a9c5f8194f8beb3eee431e33215656c *e1m1-bsp29.bsp
|
||||
85002a12afa023d850199e205f01fc58de2743f97aea9b2a22a3b0ac3ce8f7ad *e1m1-bsp2.bsp
|
||||
832ec9aff302ddfcc5ab4fe0911afec0b4d57c60e02dc1c8f61e1edbf8f53eda *e1m1-2psb.bsp
|
||||
5e20fca2a3b6c975efe257a5768d8f8cde10ecb96abec535ea2c2d0b45d3a051 *e1m1-hexen2.bsp
|
||||
018b759817dcc2ca343bdd38d511c455c13be992734e97e2fa1ad88e614240b1 *e1m1-hexen2-bsp2.bsp
|
||||
015c582d9a76ec0f911c5d5f2e7ebcc1ad01ee81860dd113222259f65a40e953 *e1m1-hexen2-2psb.bsp
|
||||
66936b95d27716cbcb28bc6bf8a0191f8d53bc7e2823abcb85cd04fec9d2fcb6 *e1m1-hlbsp.bsp
|
||||
|
|
@ -6,3 +6,4 @@ for file in *.map; do
|
|||
qbsp -leaktest -noverbose "$file" || exit 1
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue