github.com/hechain20/hechain@v0.0.0-20220316014945-b544036ba106/docs/source/dev-setup/build.rst (about) 1 Building Hechain 2 --------------------------- 3 4 The following instructions assume that you have already set up your 5 :doc:`development environment <devenv>`. 6 7 To build Hechain: 8 9 :: 10 11 make dist-clean all 12 13 Building the documentation 14 ~~~~~~~~~~~~~~~~~~~~~~~~~~ 15 16 If you are contributing to the documentation, you can build the Fabric 17 documentation on your local machine. This allows you to check the formatting 18 of your changes using your web browser before you open a pull request. 19 20 You need to download the following prerequisites before you can build the 21 documentation: 22 23 - `Docker <https://docs.docker.com/get-docker/>`__ 24 25 After you make your updates to the documentation source files, you can generate 26 a build that includes your changes by running the following commands: 27 28 :: 29 30 cd fabric 31 make docs 32 33 This will generate all the html files in the ``docs/build/html`` folder. You can 34 open any file to start browsing the updated documentation using your browser. If you 35 want to make additional edits to the documentation, you can rerun ``make html`` 36 to incorporate the changes. 37 38 Running the unit tests 39 ~~~~~~~~~~~~~~~~~~~~~~ 40 41 Use the following command to run all unit tests: 42 43 :: 44 45 make unit-test 46 47 To run a subset of tests, set the TEST_PKGS environment variable. 48 Specify a list of packages (separated by space), for example: 49 50 :: 51 52 export TEST_PKGS="github.com/hechain20/hechain/core/ledger/..." 53 make unit-test 54 55 To run a specific test use the ``-run RE`` flag where RE is a regular 56 expression that matches the test case name. To run tests with verbose 57 output use the ``-v`` flag. For example, to run the ``TestGetFoo`` test 58 case, change to the directory containing the ``foo_test.go`` and 59 call/execute 60 61 :: 62 63 go test -v -run=TestGetFoo 64 65 66 Running Node.js Client SDK Unit Tests 67 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 68 69 You must also run the Node.js unit tests to ensure that the Node.js 70 client SDK is not broken by your changes. To run the Node.js unit tests, 71 follow the instructions 72 `here <https://github.com/hyperledger/fabric-sdk-node/blob/main/README.md>`__. 73 74 Configuration 75 ------------- 76 77 Configuration utilizes the `viper <https://github.com/spf13/viper>`__ 78 and `cobra <https://github.com/spf13/cobra>`__ libraries. 79 80 There is a **core.yaml** file that contains the configuration for the 81 peer process. Many of the configuration settings can be overridden on 82 the command line by setting ENV variables that match the configuration 83 setting, but by prefixing with *'CORE\_'*. For example, setting 84 `peer.networkId` can be accomplished with: 85 86 :: 87 88 CORE_PEER_NETWORKID=custom-network-id peer 89 90 .. Licensed under Creative Commons Attribution 4.0 International License 91 https://creativecommons.org/licenses/by/4.0/