Commit 5697766e authored by Martin Jeřábek's avatar Martin Jeřábek
Browse files

place intermediate build products in build subdirectory

parent e9ebaccc
......@@ -6,9 +6,7 @@ build_ip_and_tests:
stage: build
artifacts:
paths: &vunit_build_paths
- test/vunit_out
- 'test/*.gcda'
- 'test/*.gcno'
- test/build
expire_in: 1 hour
script:
- cd test
......
*.gcda
*.gcno
/vunit_out
/build
/code_html
code_coverage.info
/work
tb_wrappers*.vhd
test*.xml
......@@ -7,7 +7,7 @@ ifeq ($(XUNIT),0)
TEST_FLAGS +=
POSTPROC := :
else
TEST_FLAGS += --xunit-xml $@.xml1
TEST_FLAGS += --xunit-xml ../$@.xml1
POSTPROC = ret=$$?; (echo '<?xml version="1.0" encoding="utf-8"?>'; echo '<?xml-stylesheet href="xunit.xsl" type="text/xsl"?>'; cat $@.xml1) >$@.xml; rm $@.xml1; exit $$ret
endif
......@@ -25,10 +25,10 @@ test_sanity:
$(PYTHON) run.py $(TEST_FLAGS) 'lib.tb_sanity.*'; $(POSTPROC)
coverage:
lcov --capture --directory . --output-file code_coverage.info
lcov --capture --directory build --output-file code_coverage.info
genhtml code_coverage.info --output-directory code_html
clean:
-rm -Rf *.gcno *.gcda vunit_out
-rm -Rf build
.PHONY: all elaborate test test_unit test_feature test_sanity clean
......@@ -10,10 +10,12 @@ from vunit.ui import VUnit
from glob import glob
from pprint import pprint
import os
from os.path import abspath
import signal
import subprocess
import re
from textwrap import dedent
from pathlib import Path
def get_children_pids(parent_pid):
cmd = subprocess.run("ps -o pid --ppid {} --noheaders".format(parent_pid), shell=True, stdout=subprocess.PIPE, check=False)
......@@ -84,7 +86,9 @@ signal.signal(signal.SIGTERM, sighandler)
signal.signal(signal.SIGINT, sighandler)
# ------------------------------------------------------------------------------
root = dirname(__file__)
root = abspath(dirname(__file__))
Path('build').mkdir(exist_ok=True)
os.chdir('build')
ui = VUnit.from_argv()
lib = ui.add_library("lib")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment