Mercurial > hg
comparison tests/run-tests.py @ 32718:232875623c27
run-tests: write JSON reports to output dir
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Wed, 07 Jun 2017 20:46:43 -0700 |
parents | e5680cb1414f |
children | 74680ed89a29 |
comparison
equal
deleted
inserted
replaced
32717:e5680cb1414f | 32718:232875623c27 |
---|---|
1923 if self._runner.options.xunit: | 1923 if self._runner.options.xunit: |
1924 with open(self._runner.options.xunit, "wb") as xuf: | 1924 with open(self._runner.options.xunit, "wb") as xuf: |
1925 self._writexunit(result, xuf) | 1925 self._writexunit(result, xuf) |
1926 | 1926 |
1927 if self._runner.options.json: | 1927 if self._runner.options.json: |
1928 jsonpath = os.path.join(self._runner._testdir, b'report.json') | 1928 jsonpath = os.path.join(self._runner._outputdir, b'report.json') |
1929 with open(jsonpath, 'w') as fp: | 1929 with open(jsonpath, 'w') as fp: |
1930 self._writejson(result, fp) | 1930 self._writejson(result, fp) |
1931 | 1931 |
1932 return result | 1932 return result |
1933 | 1933 |
1958 if self._runner.options.xunit: | 1958 if self._runner.options.xunit: |
1959 with open(self._runner.options.xunit, "wb") as xuf: | 1959 with open(self._runner.options.xunit, "wb") as xuf: |
1960 self._writexunit(result, xuf) | 1960 self._writexunit(result, xuf) |
1961 | 1961 |
1962 if self._runner.options.json: | 1962 if self._runner.options.json: |
1963 jsonpath = os.path.join(self._runner._testdir, b'report.json') | 1963 jsonpath = os.path.join(self._runner._outputdir, b'report.json') |
1964 with open(jsonpath, 'w') as fp: | 1964 with open(jsonpath, 'w') as fp: |
1965 self._writejson(result, fp) | 1965 self._writejson(result, fp) |
1966 | 1966 |
1967 self._runner._checkhglib('Tested') | 1967 self._runner._checkhglib('Tested') |
1968 | 1968 |