-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate feature added, bug fixes, and more tests
- Loading branch information
Bhargava Shastry
committed
Oct 6, 2016
1 parent
d763ddf
commit 3d15209
Showing
5 changed files
with
149 additions
and
58 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
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,28 @@ | ||
import unittest | ||
from orthrusutils.orthrusutils import * | ||
from orthrus.commands import * | ||
|
||
class TestOrthrusValidate(unittest.TestCase): | ||
|
||
description = 'Test harness' | ||
orthrusdirname = '.orthrus' | ||
|
||
def test_validate(self): | ||
args = parse_cmdline(self.description, ['validate']) | ||
cmd = OrthrusValidate(args, self.config_pass) | ||
self.assertTrue(cmd.run()) | ||
|
||
def test_validate_false(self): | ||
args = parse_cmdline(self.description, ['validate']) | ||
cmd = OrthrusValidate(args, self.config_fail) | ||
self.assertFalse(cmd.run()) | ||
|
||
def setUp(self): | ||
# self.config_pass = {'dependencies': [('clang', 'on'), ('gcc', 'on'), ('afl-fuzz', 'on'), | ||
# ('afl-clang', 'on'), ('afl-clang++', 'on'), | ||
# ('afl-collect', 'on'), ('afl-minimize', 'on'), | ||
# ('afl-multicore', 'on'), ('gdb', 'on'), ('afl-cov', 'on'), | ||
# ('lcov', 'on'), ('genhtml', 'on')]} | ||
self.config_pass = parse_config('../../conf/orthrus.conf') | ||
|
||
self.config_fail = {'dependencies': [('joombaloomba', 'on')]} |
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