diff options
author | Christopher Haster <chaster@utexas.edu> | 2020-02-10 08:09:46 +0300 |
---|---|---|
committer | Christopher Haster <chaster@utexas.edu> | 2020-02-12 01:01:57 +0300 |
commit | 9f546f154fe8b7177b253db94a763dadaf4459df (patch) | |
tree | bb9268a9bc0828b6bec3a7317f616d160979062c /scripts | |
parent | b69cf890e6889ed972ef6afa9dc4aaafb5060b73 (diff) |
Updated .travis.yml and added additional geometry constraints
Moved .travis.yml over to use the new test framework. A part of this
involved testing all of the configurations ran on the old framework
and deciding which to carry over. The new framework duplicates some of
the cases tested by the configurations so some configurations could be
dropped.
The .travis.yml includes some extreme ones, such as no inline files,
relocations every cycle, no intrinsics, power-loss every byte, unaligned
block_count and lookahead, and odd read_sizes.
There were several configurations were some tests failed because of
limitations in the tests themselves, so many conditions were added
to make sure the configurations can run on as many tests as possible.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/test.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/scripts/test.py b/scripts/test.py index cbc8838..c662a76 100755 --- a/scripts/test.py +++ b/scripts/test.py @@ -184,7 +184,8 @@ class TestCase: elif self.if_ is not None: if_ = self.if_ while True: - for k, v in self.defines.items(): + for k, v in sorted(self.defines.items(), + key=lambda x: len(x[0]), reverse=True): if k in if_: if_ = if_.replace(k, '(%s)' % v) break @@ -295,11 +296,11 @@ class ValgrindTestCase(TestCase): return not self.leaky and super().shouldtest(**args) def test(self, exec=[], **args): - exec = exec + [ + exec = [ 'valgrind', '--leak-check=full', '--error-exitcode=4', - '-q'] + '-q'] + exec return super().test(exec=exec, **args) class ReentrantTestCase(TestCase): @@ -310,7 +311,7 @@ class ReentrantTestCase(TestCase): def shouldtest(self, **args): return self.reentrant and super().shouldtest(**args) - def test(self, exec=[], persist=False, gdb=False, failure=None, **args): + def test(self, persist=False, gdb=False, failure=None, **args): for cycles in it.count(1): # clear disk first? if cycles == 1 and persist != 'noerase': @@ -376,10 +377,11 @@ class TestSuite: # code lineno? if 'code' in case: case['code_lineno'] = code_linenos.pop() - # give our case's config a copy of our "global" config - for k, v in config.items(): - if k not in case: - case[k] = v + # merge conditions if necessary + if 'if' in config and 'if' in case: + case['if'] = '(%s) && (%s)' % (config['if'], case['if']) + elif 'if' in config: + case['if'] = config['if'] # initialize test case self.cases.append(TestCase(case, filter=filter, suite=self, caseno=i+1, lineno=lineno, **args)) |