(tmpdir)
| 114 | |
| 115 | |
| 116 | def test_misra_py(tmpdir): |
| 117 | # 13831 - do not execute misra.py when --premium=misra-c-2012 is used |
| 118 | test_file = os.path.join(tmpdir, 'test.c') |
| 119 | with open(test_file, 'wt') as f: |
| 120 | f.write('void foo();\n') |
| 121 | |
| 122 | exe = __copy_cppcheck_premium(tmpdir) |
| 123 | |
| 124 | # ensure that misra.py is not available: |
| 125 | _, stdout, _ = cppcheck(['--enable=style', '--addon=misra', test_file], cppcheck_exe=exe) |
| 126 | assert 'Did not find addon misra.py' in stdout |
| 127 | |
| 128 | # Execute misra |
| 129 | _, stdout, _ = cppcheck(['--enable=style', '--premium=misra-c-2012', test_file], cppcheck_exe=exe) |
| 130 | assert 'misra.py' not in stdout # Did not find misra.py |
| 131 | assert 'Checking' in stdout |
| 132 | |
| 133 | |
| 134 | def test_invalid_license_retry(tmpdir): |
nothing calls this directly
no test coverage detected