How to setup, build, and run tests on Windows
Setup Git
1. Install git for Windows.2. If you like PowerShell, we recommend installing Posh-Git (here is how).
3. If you prefer the plain cmd.exe command line, open the Developer Command Prompt for VS2013 (here is how)
Get the source
git clone https://git01.codeplex.com/casablanca
This will clone Casablanca source into a directory named casablanca.
Going forward, you will want to pull from the master branch, which will always contain the last known release. The development branch contains the latest work but is not stable.
If you're using PowerShell, you can now set up VC++ compiler toolset by running the setup_ps_env_for_VS2013.ps1 script.
Build from source
There are two ways you can build on Windows, from the command line or from Visual Studio. The command line build is preferred if you want to quickly build from source and run tests. Visual Studio gives the best experience if you want to explore the innards of the code base, add new features etc.Command line
To build from command line, navigate to the Release directory in the repository and type:msbuild dirs.proj /p:Configuration=Debug /p:Platform=x64 /p:UseEnv=true
(You might need to change the Configuration and Platform parameters as needed)
Visual Studio solution files
Another way to build is by using the Visual Studio solution files. They contain the product code and samples. Please note none of the tests are included in the solution files, if you wish to build the tests you will have to follow the command line instructions or create your own solution files.The Visual Studio solution files are located in the top of the repository. Different files exist for Visual Studio 2012, 2013, and for desktop and store/phone development. For example the solution file called casablanca120.desktop.sln contains the projects for Windows desktop development with Visual Studio 2013. To build simply open the solution file you need and away you go!
Run the tests
- Navigate to the Casablanca Release\tests\ directory
- Build following the command line instructions above, i.e. msbuild dirs.proj /p:Configuraion=Debug /p:Platform=x64
- After building completed, you can run the tests.
- Navigate to the Binaries directory and select the correct folder based on the configuration you built for
- Type the following command: TestRunner.exe
- You can now see all of the options available to run tests
- For example if we want to run all of the tests we can enter the following command:
TestRunner.exe *test*
Or if you wanted to only run the json tests use the following:
TestRunner.exe JSON120_test.dll