Skip to content

Commit

Permalink
Converted unit test buildsystem from SCons to Lua+Ninja
Browse files Browse the repository at this point in the history
  • Loading branch information
ludocode committed Jul 26, 2019
1 parent e2f5d7b commit bed92fc
Show file tree
Hide file tree
Showing 16 changed files with 642 additions and 307 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -13,6 +13,8 @@ mpack-test-blank-file
/analysis/
/docs/html/
/vgcore.*
/.ninja_deps
/.ninja_log

# visual studio project
*.suo
Expand All @@ -32,4 +34,3 @@ xcuserdata/
# other junk
.directory
/tags

34 changes: 18 additions & 16 deletions .travis.yml
@@ -1,13 +1,14 @@
language: c

dist: trusty
dist: bionic
sudo: false

addons:
apt:
packages:
- clang
- valgrind
# apparently apt addon doesn't work on bionic?
before_install:
- sudo apt-get update
- sudo apt-get install -y build-essential gcc-multilib g++-multilib clang cmake lua5.1 luarocks ninja-build libc6-dbg:i386 tcc valgrind
- CC= CXX= sudo luarocks install luafilesystem
- CC= CXX= sudo luarocks install rapidjson

script: tools/ci.sh

Expand All @@ -27,18 +28,19 @@ matrix:
- os: osx
compiler: clang
env: "OSX=1"
# disable before_install here to avoid apt-get on mac
before_install:

# code coverage build
- os: linux
compiler: gcov
env: "STANDARD=1"
addons:
apt:
packages:
- valgrind
# these packages are needed for urllib3[secure] for SNI support for
# coveralls integration
- build-essential
- python-dev
- libffi-dev
- libssl-dev
before_install:
- sudo apt-get update
# these packages are needed for urllib3[secure] for SNI support for
# coveralls integration
- sudo apt-get install -y python-dev libffi-dev libssl-dev
# the rest of this is copied from above
- sudo apt-get install -y build-essential gcc-multilib g++-multilib clang cmake lua5.1 luarocks ninja-build libc6-dbg:i386 tcc valgrind
- CC= CXX= sudo luarocks install luafilesystem
- CC= CXX= sudo luarocks install rapidjson
8 changes: 2 additions & 6 deletions README.md
Expand Up @@ -133,12 +133,8 @@ The above issues greatly increase the complexity of the decoder. Full-featured J

While the space inefficiencies of JSON can be partially mitigated through minification and compression, the performance inefficiencies cannot. More importantly, if you are minifying and compressing the data, then why use a human-readable format in the first place?

## Running the Unit Tests
## Testing MPack

The MPack build process does not build MPack into a library; it is used to build and run the unit tests. You do not need to build MPack or the unit testing suite to use MPack.

On Linux, the test suite uses SCons and requires Valgrind, and can be run in the repository or in the amalgamation package. Run `scons` to build and run the test suite in full debug configuration.

On Windows, there is a Visual Studio solution, and on OS X, there is an Xcode project for building and running the test suite.

You can also build and run the test suite in all supported configurations, which is what the continuous integration server will build and run. If you are on 64-bit, you will need support for cross-compiling to 32-bit, and running 32-bit binaries with 64-bit Valgrind. On Ubuntu, you'll need `libc6-dbg:i386`. On Arch you'll need `gcc-multilib` or `lib32-clang`, and `valgrind-multilib`. Use `scons all=1 -j16` (or some appropriate thread count) to build and run all tests.
See [test/README.md](test/README.md) for information on how to test MPack.
35 changes: 0 additions & 35 deletions SConscript

This file was deleted.

239 changes: 0 additions & 239 deletions SConstruct

This file was deleted.

File renamed without changes.
File renamed without changes.

0 comments on commit bed92fc

Please sign in to comment.