GithubHelp home page GithubHelp logo

isabella232 / bat-native-ledger-isolation-test Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brave-intl/bat-native-ledger-isolation-test

0.0 0.0 0.0 2.25 MB

MS Visual Studio testing/debugging environment for bat-native-ledger project

C++ 1.51% C 98.48% Batchfile 0.01%

bat-native-ledger-isolation-test's Introduction

MS Visual Studio isolated testing/debugging environment for bat-native-ledger project.

It is made to test and debug the bat-native-ledger library in isolated environment excluding interaction with hosting browser application. The solution is based on MS Visual Studio solution and projects, and allows using all power of VS IDE. It includes all bat-native-ledger's dependencies as submodules, bat-native-ledger itself, test driver application and curl library for handling http/https communication. The solution has Debug and Release configurations for x86 and x86_64 platforms. Some of the dependencies have pre-generated configuration files and minor patches to make code compilable in VS. (The config files and patches are located in 'patches' directory.)

Branch/commit of each component used in the solution.

All libraries,including bat-native-ledger are moving forward and their interfaces are changing. The solution is bound to a particular branch/commit of each component. Switching to a newer commit is possible but will require some work to put it together.

  • bat-native-anonize: master/e9f5bca3ed69e3db7223be4eac2d59145a7a83a2
  • bat-native-ledger: master/693c6d49a58caf36de77a60aee7bf23fe51162a0
  • bat-native-rapidjson: master/86aafe2ef89835ae71c9ed7c2527e3bb3000930e
  • bat-native-tweetnacl: master/1b4362968c8f22720bfb75af6f506d4ecc0f3116
  • bip39wally-core-native: master/e5aba371a56d3e41f7e80e868312446ce7bd434c
  • boringssl: master/0080d83b9faf8dd325f5f5f92eb56faa93864e4c
  • curl: master/7212c4cd607af889c9adc47030a84b6f8ac3b0f6
  • leveldb: windows/ad834a20a651ebcabf7c03a88712e780a965d4e3
  • snappy: master/4f7bd2dbfd12bfda77488baf46c2f7648c9f1999
  • SqliteModernCpp: master/1937817c1a6d9bcca19bf6e705cf6df4a1fe404d
  • sqlite: version 3.24.0

Switching to a new commit will also require updating this README.md.

Prerequisites:

  • The leveldb for windows depends on Boost C++ library. The easiest way is to install pre-built Windows binaries and source files from Boost download page. Configurations for x86 or x86_64 will require the matching set of libraries. Tested with boost_1_67_0-msvc-14.1-32 and boost_1_67_0-msvc-14.1-64. The location of Boost include directory and libs can be configured in projects properties files globals.props, x86.props and x86_64.props (in 'msvcpp' directory) in variables $(Boost) and $(BoostLib) (set to 'C:\lib\boost_1_67_0' by default).

Initial setup:

To bring all the dependencies, to switch to the right commit and to apply patches please run pull-depends.bat from the repository root directory.

Testing:

  • The bat-native-ledger library is using threads to run tasks and callbacks. Use BraveRewardsService::TestingJoinAllRunningTasks() call after each test to wait for all spawned tasks/callbacks.

  • LedgerImpl::RefreshPublishersList is using recursive timer to download a fresh verified publishers list. In this case there will always be a timer waiting task running in background and BraveRewardsService::TestingJoinAllRunningTasks() will wait forever. Call BraveRewardsService::AllowTimersRun(number_of_timers) (set to 1 by default) before BraveRewardsService::Init() to allow a maximum number of timers iterations to run.

  • If you have to run your testing again and again, then don't forget to delete files publisher_state, publishers_list, ledger_state from your home directory.

bat-native-ledger-isolation-test's People

Contributors

gdregalo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.