From 128906a13d49312513d30ebdd51edbe050a744d4 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 20 May 2020 10:53:25 -0300 Subject: [PATCH] Added DRC test --- tests/test_plot/test_preflight.py | 12 ++++++++++-- tests/yaml_samples/drc.kiplot.yaml | 8 ++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 tests/yaml_samples/drc.kiplot.yaml diff --git a/tests/test_plot/test_preflight.py b/tests/test_plot/test_preflight.py index 1ee8281a..46303d2c 100644 --- a/tests/test_plot/test_preflight.py +++ b/tests/test_plot/test_preflight.py @@ -3,6 +3,7 @@ Tests for the preflight options We test: - ERC +- DRC For debug information use: pytest-3 --log-cli-level debug @@ -24,6 +25,13 @@ def test_erc(): ctx.run() # Check all outputs are there ctx.expect_out_file(prj+'.erc') - # We don't have a project, and we don't want one - os.remove(os.path.join(ctx.get_board_dir(), prj+'.pro')) + ctx.clean_up() + + +def test_drc(): + prj = 'bom' + ctx = context.TestContext('DRC', prj, 'drc', '') + ctx.run() + # Check all outputs are there + ctx.expect_out_file('drc_result.rpt') ctx.clean_up() diff --git a/tests/yaml_samples/drc.kiplot.yaml b/tests/yaml_samples/drc.kiplot.yaml new file mode 100644 index 00000000..aaec358e --- /dev/null +++ b/tests/yaml_samples/drc.kiplot.yaml @@ -0,0 +1,8 @@ +# Example KiPlot config file +kiplot: + version: 1 + +preflight: + run_drc: true + +