-
Notifications
You must be signed in to change notification settings - Fork 12
Running the Tests
mogemimi edited this page Aug 19, 2018
·
13 revisions
⚠️ This is the documentation for older version. Please see the new documentation Running the Tests instead.
- Git
- Python 2.7
- Xcode 8.3+ (Mac OS X)
- Visual Studio 2017 (Windows)
- Clang 3.8 (Linux)
First, you need to download build dependencies and unit testing framework.
cd path/to/pomdog
python tools/download_dependencies.py
Please see Download Build Dependencies for more details.
# Generate Makefiles
python tools/gyp.py test/FrameworkTest/unittest.gyp -f make
# Compiling source code
export CC=clang
export CXX=clang++
export LINK=clang++
export CXXFLAGS="-std=c++14 -stdlib=libc++"
export LDFLAGS="-stdlib=libc++"
make -C build.makefiles
# Run the unit tests
build.makefiles/out/Release/unittest
To run all unit tests, use:
# Generating Xcode project files
python tools/gyp.py test/FrameworkTest/unittest.gyp -f xcode
# Compiling source code
xcodebuild -project build.xcodefiles/test/FrameworkTest/unittest.xcodeproj
# Run the unit tests
test/FrameworkTest/build/Release/unittest
PowerShell
python tools\gyp\gyp_main.py test/FrameworkTest/unittest.gyp `
--depth=. -f msvs -G msvs_version=2017 --generator-output=build.msvs
Git Bash (MinGW)
python tools/gyp/gyp_main.py test/FrameworkTest/unittest.gyp \
--depth=. -f msvs -G msvs_version=2017 --generator-output=build.msvs
PowerShell
$msbuild = "${env:ProgramFiles(x86)}\MSBuild\15.0\Bin\MSBuild.exe"
$solution = 'build.msvs\test\FrameworkTest\unittest.sln'
$options = '/t:Build', '/p:Configuration=Release'
& $msbuild $solution $options
Git Bash (MinGW)
export MSBUILD="/c/Program Files (x86)/MSBuild/15.0/Bin/MSBuild.exe"
"$MSBUILD" build.msvs/test/FrameworkTest/unittest.sln -t:Build -p:Configuration=Release
To run all unit tests, use:
PowerShell
build.msvs\test\FrameworkTest\Release\unittest
Git Bash (MinGW)
build.msvs/test/FrameworkTest/Release/unittest.exe