Update usr/src/README for pep8 instructions
authorMary Ding <mary.ding@oracle.com>
Wed, 20 Apr 2011 19:38:55 -0700
changeset 1085 3d8b43a50cbe
parent 1084 7a444c2b09f8
child 1086 f08417492bbc
Update usr/src/README for pep8 instructions
usr/src/README
--- a/usr/src/README	Wed Apr 20 11:20:52 2011 -0700
+++ b/usr/src/README	Wed Apr 20 19:38:55 2011 -0700
@@ -82,6 +82,40 @@
     pkglint(1) ERRORs. Please refer to usr/src/pkg/README.pkg for
     more details.
 
+To run unit tests after building packages:
+------------------------------------------
+
+ 1. cd usr/src/tools/tests
+ 2.  Follow the README and run the slim_unit tests
+ 3.  If there is new unit tests failures, those must be fixed before putback.
+
+To check for pep8 slim_code_cleanliness:
+----------------------------------------
+
+ 1. Install the Python setup tools:
+                pkg install library/python-2/setuptools-26
+ 
+ 2. Install the pep8 3rd tool:
+
+                easy_install pep8
+                (The warning messages during installation may be ignored)
+
+ 3.  And the python setup tools will find it, download, and install it for you as /usr/bin/pep8
+
+ 4.  You can check for pep8 cleanliness mimicking the command that hudson use:
+
+/usr/bin/pep8 --ignore=E261,W291,W293 --count -r --show-source <file/folder>
+
+i.e.:
+
+# cd lib/install_target
+# /usr/bin/pep8 --ignore=E261,W291,W293 --count -r --show-source logical.py
+
+logical.py:58:23: E241 multiple spaces after ','
+    def __init__(self,  name):
+                      ^
+1
+
 --------------------------------------------------------------------
 Notes: