|
|
The best way to get the source code for the Caiman projects is to use our Mercurial repository, which is also browseable. Obtain a local copy of the source using:
hg clone ssh://anon@hg.opensolaris.org/hg/caiman/slim_source
For instructions on how to build, please reference the README in the repository. Also, we recommend running the /opt/onbld/bin/hgsetup command from the developer/build/onbld package to ensure that your environment is set up correctly for OpenSolaris development.
In order to integrate code, you must do the following:
All integrations into the slim_source gate are required to include unit tests. For new projects, the unit tests must demonstrate 80% coverage* of the new code. For bug fixes, the tests should at minimum cover the scenario which caused the bug. Including additional unit tests that cover additional scenarios of the modified functions is strongly preferred when modifying existing code that does not yet have 80% coverage. For Python code, PyUnit (the unittest module) should be used for writing the tests. For other code, guidelines are not yet finalized (and most non-Python code is excluded from this requirement, see below). Note that for C code that compiles into a Python module, the Python interfaces exposed should be testable via PyUnit.
Doctest may be used to supplement PyUnit tests; though please focus on primary usage scenarios for doctests to avoid cluttering the docstring of a function with edge cases.
Bug fixes to existing non-Python code are currently excluded from this requirement. Additionally, some Python code will be replaced as part of future project work; such Python code will not require tests either (tests should be delivered with the project). However, writing a few short unit tests against that Python code will not hurt in the short term. See the exclusion list** for a list of what directories and files are excluded from the testing requirement.
Existing unit tests can be run by cd'ing into their directory and running "python <testfilename>". See the lib/liberrsvc_pymod/test directory for a current example. New test suites should follow that example. In the near future, running of unit tests is expected to be integrated into a makefile target. Additionally, recommendations and instructions on checking the current code coverage percentage will be forthcoming.
* Why 80%? Is this a strict requirement?
~** This list is a guideline and subject to change. If in doubt, check with <caiman-discuss@opensolaris.org> to verify the testing requirements for code changes - and do so as early as possible!
Bugs should be filed on defect.opensolaris.org, under classification "Development", product "installer", "livecd", or "distro-constructor" depending on which functionality they relate to. We are also responsible for bugs filed under classification "Distribution", product "opensolaris", components "livecd" and "installer". It's a very good idea to search the database for your issue prior to filing a new one. It's entirely possible that someone has already filed the issue you are seeing. This will help alleviate the burden of marking bugs as duplicates. The following links list the bugs under each classification that we are responsible for:
In order to be notified by email when bugs are filed or updated, you need to go to your Email Preferences tab on defect.opensolaris.org and add the following user accounts to your watch list:
qa-distro-constructor@defect.opensolaris.org, qa-installer@defect.opensolaris.org. qa-livecd@defect.opensolaris.org
When you grab a bug to work on it, please assign yourself to the bug. If you decide to stop working on it, reset the assignee to the default.
Although bugzilla should constrain the state transition to some extent, if we constrain it too much, you have to go through a number of state transitions to get to where you want to go. If there are problems with the state transitions (like they're proving to be super inconvenient), raise the issue on caiman-discuss.
Generally, when you figure out why the buggy behavior is as it is, explain it and change the state to CAUSEKNOWN. When you figure out how to fix it, explain the fix and change the state to FIXUNDERSTOOD. When you actually start fixing the bug, change the state to FIXINPROGRESS. Once you've gotten all your testing done, reviews completed, etc, and pushed a changeset containing the fix to the main repository, add a comment like "Fixed in changeset XXX." (where XXX is either the short or long hex changeset id), and change the state to RESOLVED/FIXINSOURCE.
Unless you're a project leader, don't change the state to anything more resolved than that, unless you're closing it off as a duplicate, saying you won't fix it, or can't reproduce, etc. Don't mark it as RESOLVED/FIXED or CLOSED/FIXED or FIXINBUILD. These are all "gatekeeper" states, at least for now.
The protocol for any heads-up or flag day notifications that affect either developers or end users of the installer is:
What's the difference between a heads-up and a flag day? A flag day results when it's necessary for developers or users to synchronize additional changes with yours, such as requiring a specific build level for the build to work, a new version of a build tool or compiler, or something like that. A heads-up is more appropriate for noting changes in behavior of the build or product that might otherwise be surprising, or to note the introduction of a new feature. If in doubt, ask one of the project leads for an opinion.
When adding new Python files to slim_source, please include a "shebang" line as the first line in the file. This is required in order for pkgdepend(1) to properly identify the file as being Python (pkgdepend(1) is used during a build to automatically generate the IPS dependencies for built packages). The line should be as follows:
Terms of Use
|
Privacy
|
Trademarks
|
Copyright Policy
|
Site Guidelines
|
Site Map
|
Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.
© 2012, Oracle Corporation and/or its affiliates.