DescriptionUse import instead of subprocess for charm proof.
To speed up proof, we use the newly created proof lib in charm-tools instead
of a call out to "charm proof" via subprocess.
* Replace config.CHARM_PROOF_BIN with config.CHARM_PROOF_PATH, a path to the
library's parent dir.
* Added patch_path and unpatch_path, which (within a try...finally block)
safely manage modifying the path during the job's `run` method.
* Removed exception handling that required subprocess management, as we know
longer have that; this sadly leaves us with only the "Exception" clause around
the call to proof_charm, since we can't capture the data from the subprocess
stream.
* Updates the checks for a functioning binary with checks that the lib path
exists.
* Updated the error messages and tests.
As a note; the previous version of this set CHARM_PROOF_PATH to
$charm-tool-dir/script/lib, and imported proof. As the name of the job is
proof, and both methods are "run" this led to a really fun bug. We now import
lib.proof as prooflib, and point the CHARM_PROOF_PATH to the parent directory
of the proof lib. This works just fine.
https://code.launchpad.net/~jcsackett/charmworld/use-libified-proof/+merge/143790
(do not edit description out of merge proposal)
Patch Set 1 #Patch Set 2 : Use import instead of subprocess for charm proof. #
Total comments: 6
Patch Set 3 : Use import instead of subprocess for charm proof. #
Total comments: 6
Patch Set 4 : Use import instead of subprocess for charm proof. #Patch Set 5 : Use import instead of subprocess for charm proof. #Patch Set 6 : Use import instead of subprocess for charm proof. #
Total comments: 1
MessagesTotal messages: 16
|