summaryrefslogtreecommitdiff
path: root/DEVELOPING.md
diff options
context:
space:
mode:
authorNan Zhou <nanzhoumails@gmail.com>2022-02-25 02:22:15 +0300
committerEd Tanous <ed@tanous.net>2022-04-14 01:02:25 +0300
commit725525eaac83bb355fb34aec5513a0a499fb471c (patch)
tree08194fe5287f6988fae21fe38babafa2f70d9e0f /DEVELOPING.md
parentca1600c10f43648ce90f84a2a712c6ebd043dded (diff)
downloadbmcweb-725525eaac83bb355fb34aec5513a0a499fb471c.tar.xz
doc: add a testing doc as guidelines for commits
Context: https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/50742 is a small but important change that changes how http_connection works. Maintainers recommends doing a more complete testing for this type of change. I found that having some docs as reference when performing testing is helpful for every contributor. Add a document for different types of testing we want contributors to perform and include results in their commit messages. This doc will evolve. Also moved relevant sections in existing docs into this doc. Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: Ia0b35950540ec6efaa813516d0e545c4b8f7c609
Diffstat (limited to 'DEVELOPING.md')
-rw-r--r--DEVELOPING.md79
1 files changed, 0 insertions, 79 deletions
diff --git a/DEVELOPING.md b/DEVELOPING.md
index 5ff1391491..1a9712a258 100644
--- a/DEVELOPING.md
+++ b/DEVELOPING.md
@@ -126,85 +126,6 @@
starting any openbmc development.
[Common Errors](https://github.com/openbmc/bmcweb/blob/master/COMMON_ERRORS.md).
-14. ### Developing and Testing
- There are a variety of ways to develop and test bmcweb software changes.
- Here are the steps for using the SDK and QEMU.
-
- - Follow all [development environment setup](https://github.com/openbmc/docs/blob/master/development/dev-environment.md)
- directions in the development environment setup document. This will get
- QEMU started up and you in the SDK environment.
- - Follow all of the [gerrit setup](https://github.com/openbmc/docs/blob/master/development/gerrit-setup.md)
- directions in the gerrit setup document.
- - Clone bmcweb from gerrit
- ```
- git clone ssh://openbmc.gerrit/openbmc/bmcweb/
- ```
-
- - Follow directions in [README.md](https://github.com/openbmc/bmcweb#configuration) to compile
-
- - Reduce binary size by stripping it when ready for testing
- ```
- arm-openbmc-linux-gnueabi-strip bmcweb
- ```
- **Note:** Stripping is not required and having the debug symbols could be
- useful depending on your testing. Leaving them will drastically increase
- your transfer time to the BMC.
-
- - Copy your bmcweb you want to test to /tmp/ in QEMU
- ```
- scp -P 2222 bmcweb root@127.0.0.1:/tmp/
- ```
- **Special Notes:**
- The address and port shown here (127.0.0.1 and 2222) reaches the QEMU session
- you set up in your development environment as described above.
-
- - Stop bmcweb service within your QEMU session
- ```
- systemctl stop bmcweb
- ```
- **Note:** bmcweb supports being started directly in parallel with the bmcweb
- running as a service. The standalone bmcweb will be available on port 18080.
- An advantage of this is you can compare between the two easily for testing.
- In QEMU you would need to open up port 18080 when starting QEMU. Your curl
- commands would need to use 18080 to communicate.
-
- - If running within a system that has read-only /usr/ filesystem, issue
- the following commands one time per QEMU boot to make the filesystem
- writeable
- ```
- mkdir -p /var/persist/usr
- mkdir -p /var/persist/work/usr
- mount -t overlay -o lowerdir=/usr,upperdir=/var/persist/usr,workdir=/var/persist/work/usr overlay /usr
- ```
-
- - Remove the existing bmcweb from the filesystem in QEMU
- ```
- rm /usr/bin/bmcweb
- ```
-
- - Link to your new bmcweb in /tmp/
- ```
- ln -sf /tmp/bmcweb /usr/bin/bmcweb
- ```
-
- - Test your changes. bmcweb will be started automatically upon your
- first REST or Redfish command
- ```
- curl -c cjar -b cjar -k -X POST https://127.0.0.1:2443/login -d "{\"data\": [ \"root\", \"0penBmc\" ] }"
- curl -c cjar -b cjar -k -X GET https://127.0.0.1:2443/xyz/openbmc_project/state/bmc0
- ```
-
- - Stop the bmcweb service and scp new file over to /tmp/ each time you
- want to retest a change.
-
- See the [REST](https://github.com/openbmc/docs/blob/master/REST-cheatsheet.md)
- and [Redfish](https://github.com/openbmc/docs/blob/master/REDFISH-cheatsheet.md) cheatsheets for valid commands.
-
- Please test all Redfish changes with the
- [Redfish Service Validator](https://github.com/DMTF/Redfish-Service-Validator).
- Your change should not introduce any new validator errors. Please include
- the Redfish Service Validator results as part of the commit message
- ["Tested" field](https://github.com/openbmc/docs/blob/master/CONTRIBUTING.md#testing).
## clang-tidy