diff mbox series

README: Add some notes on testing

Message ID 20220303014934.757630-1-joel@jms.id.au
State New
Headers show
Series README: Add some notes on testing | expand

Checks

Context Check Description
snowpatch_ozlabs/github-CI success Successfully ran 1 jobs.
snowpatch_ozlabs/github-build_and_test success Successfully ran 1 jobs.

Commit Message

Joel Stanley March 3, 2022, 1:49 a.m. UTC
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
diff mbox series

Patch

diff --git a/README.md b/README.md
index 0441d8942cbd..316976e8703b 100644
--- a/README.md
+++ b/README.md
@@ -39,6 +39,53 @@  make
 rsync pdbg root@bmc:/usr/local/bin
 ```
 
+## Testing
+
+There is a test suite to perform some basic testing. The tests on the host
+are mostly unit tests that exercise the device tree based targetting code.
+
+```
+make check
+```
+
+### BMC testing
+
+To test on the bmc, make a build in a separate directory:
+
+```
+cd pdbg
+mkdir obj-arm
+cd obj-arm
+../configure --host=arm-openbmc-linux-gnueabi
+make -j
+```
+
+And create a configuration file `.test.pdbg` in the pdbg source directory:
+
+```
+BMC_HOST=mybmc.ibm.com
+BMC_USER=root
+BMC_PASS=passw0rd
+PDBG_ARM_BUILD=obj-arm
+```
+
+The BMC must have the host powered on and be accessible via ssh.
+
+Then run make check. It will test both the host unit tests, and copy the arm
+binary to the BMC and run it there:
+
+```
+-- BMC HW tests
+sending incremental file list
+created directory /tmp/pdbg
+...
+Checking if the host is up... yes
+  PASS: /tmp/pdbg/pdbg -p0 getcfam 0xc09
+  PASS: /tmp/pdbg/pdbg -p0 getscom 0xf000f
+  PASS: /tmp/pdbg/pdbg -p0 putmem 0x31000000
+  PASS: /tmp/pdbg/pdbg -p0 getmem --raw 0x31000000 0x8
+```
+
 ## Usage
 
 Several backends are supported depending on which system you are using and are