-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enabled code coverage for AutoTuner smoke tests
Signed-off-by: Jeff Ng <jeffng@precisioninno.com>
- Loading branch information
Showing
8 changed files
with
46 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
|
||
|
||
class AutoTunerTestUtils: | ||
@staticmethod | ||
def get_exec_cmd(): | ||
""" | ||
Returns the execution command based on whether this is a coverage run or | ||
not. | ||
Note that you need to run coverage combine after the runs complete to | ||
get the coverage of the parent plus the child invocations | ||
""" | ||
|
||
if "COVERAGE_RUN" in os.environ: | ||
exec = "coverage run --parallel-mode --omit=*/site-packages/*,*/dist-packages/*" | ||
else: # pragma: no cover | ||
exec = "python3" | ||
return exec + " -m autotuner.distributed" | ||
|
||
|
||
if __name__ == "__main__": # pragma: no cover | ||
print(AutoTunerTestUtils.get_exec_cmd()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters