![]() |
FOSSology Advancing open source analysis and development |
This shows you the differences between the selected revision and the current version of the page.
| test_organization_proposal 2010/07/22 16:46 | test_organization_proposal 2010/08/09 11:08 current | ||
|---|---|---|---|
| Line 30: | Line 30: | ||
| decision is made, it is very costly and time consuming to move things | decision is made, it is very costly and time consuming to move things | ||
| around again. | around again. | ||
| + | |||
| + | >>larry: for compiled language using option 1, the others using option 2. this make sense? | ||
| ==== Proposal ==== | ==== Proposal ==== | ||
| * Group all unit tests with the sources | * Group all unit tests with the sources | ||
| - | * they have to be kept in sync with the sources, having them with the sources makes that easier. So the developer could do a make, make tests and then run the unit tests after code changes. Make all would make the tests (and run them?). | + | * they have to be kept in sync with the sources, having them with the sources makes that easier. So the developer could do a make, make tests and then run the unit tests after code changes. Make all would make the tests and run them. The directory structure that will be used is everything grouped under a test directory. Using the unpack agent as an example there should be tests for each subunit, (ununpack.c, checksum.c deptartition.c sha1.c, ununpack-disk.c etc...) |
| + | |||
| + | ...fossology/agents/ununpack/tests/test_ununpack.c | ||
| + | ...fossology/agents/ununpack/tests/test_checksum.c | ||
| + | ... | ||
| + | |||
| + | >>larry: after I thought about your proposal last week, I think that your proposal is better. | ||
| + | >>>mark: OK. What's more important is consistency. So a directory per source file like the example below with a makefile in each leaf directory. | ||
| + | |||
| + | ...fossology/agents/ununpack/tests/Makefile | ||
| + | ...fossology/agents/ununpack/tests/ununpack/function_A.c function_B.c .... Makefile | ||
| + | ...fossology/agents/ununpack/tests/checksum/function_A.c function_B.c .... Makefile | ||
| * group functional/system tests in one source tree. | * group functional/system tests in one source tree. | ||
| * All functional tests in one place. Don't have to look all over the source tree for them. Functional tests need to change with the sources, but are usually broken by output changes rather than code changes so the need to keep them in sync with the product source files is less. | * All functional tests in one place. Don't have to look all over the source tree for them. Functional tests need to change with the sources, but are usually broken by output changes rather than code changes so the need to keep them in sync with the product source files is less. | ||
| + | |||
| + | >>larry: sorry, can you explain it with one example? | ||
| + | |||
| + | ...fossology/tests/copyright/<test-files> | ||
| + | ...fossology/tests/nomos/<test-files> | ||
| + | .../fossology/tests/ui/<test-files> | ||
| + | |||
| + | Does that help? | ||
| ==== Other References ==== | ==== Other References ==== | ||