Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

SF_WEB=hpcoder@web.sourceforge.net:/home/project-web/minsky/htdocs

export DEBUG
export GCC
export AEGIS
export MXE
export OPENMP
export OPT

# location of TCL and TK libraries
TCL_PREFIX=$(shell grep TCL_PREFIX $(call search,lib*/tclConfig.sh) | cut -f2 -d\')
TCL_VERSION=$(shell grep TCL_VERSION $(call search,lib*/tclConfig.sh) | cut -f2 -d\')
Expand Down Expand Up @@ -44,7 +51,7 @@ ifneq ($(MAKECMDGOALS),clean)
# disable AEGIS build here, as EcoLab 6 is still a little raw
build_ecolab:=$(shell cd ecolab; if $(MAKE) $(MAKEOVERRIDES) AEGIS= $(JOBS) only-libs >build.log 2>&1; then echo "ecolab built"; fi)

$(warning $(build_ecolab))
#$(warning $(build_ecolab))
ifneq ($(build_ecolab),ecolab built)
$(warning $(shell cat ecolab/build.log))
$(error Making ecolab failed: check ecolab/build.log)
Expand Down Expand Up @@ -547,18 +554,24 @@ dist:
js-dist:
sh makeJsDist.sh

.PHONY: lcov
lcov: export GCC=1
lcov: export GCOV=1
LCOV_FLAGS=--no-external --ignore-errors gcov,mismatch,wrap,version
lcov:
$(MAKE) clean
Comment thread
coderabbitai[bot] marked this conversation as resolved.
-$(MAKE) GCC=1 GCOV=1 tests python3
lcov -i -c -d . $(LCOV_FLAGS) -o lcovi.info
$(MAKE) tests
# lcov -i -c -d . $(LCOV_FLAGS) -o lcovi.info
# ensure schema export code is exercised
-$(MAKE) GCOV=1 minsky.xsd
-$(MAKE) GCOV=1 sure
lcov -c -d . $(LCOV_FLAGS) -o lcovt.info
lcov -a lcovi.info -a lcovt.info -o lcov.info
lcov -r lcov.info --ignore-errors unused */ecolab/* "*.cd" "*.xcd" "*.rcd" "*.tcd" -o lcovr.info
genhtml -o coverage lcovr.info
-$(MAKE) minsky.xsd
-$(MAKE) sure
mkdir -p coverage
gcovr -r . --html --html-details coverage/index.html
# lcov -c -d . $(LCOV_FLAGS) -o lcovt.info
# lcov -a lcovi.info -a lcovt.info -o lcov.info
# lcov -r lcov.info --ignore-errors unused */ecolab/* "*.cd" "*.xcd" "*.rcd" "*.tcd" -o lcovr.info
# genhtml -o coverage lcovr.info
Comment thread
highperformancecoder marked this conversation as resolved.


compile_commands.json: Makefile
-rm *.o
Expand Down
21 changes: 12 additions & 9 deletions engine/mdlReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -292,16 +292,19 @@ namespace minsky
if (name.substr(0,9)==R"(\\\---///)")
break; // we don't parse the sketch information - not used in Minsky
string definition;
if (nameStr.back()=='=')
// only read definition if this was a variable definition
definition=collapseWS(trimWS(readToken(mdlFile,'~')));
switch (definition[0])
if (!nameStr.empty() && nameStr.back()=='=')
{
case '=': case ':': // for now, treat constant assignment and data assignment equally to numeric assignment
definition.erase(definition.begin());
break;
default:
break;
// only read definition if this was a variable definition
definition=collapseWS(trimWS(readToken(mdlFile,'~')));
if (!definition.empty())
switch (definition[0])
{
case '=': case ':': // for now, treat constant assignment and data assignment equally to numeric assignment
definition.erase(definition.begin());
break;
default:
break;
}
}
auto unitField=trimWS(readToken(mdlFile,'~'));
regex_match(unitField,match,unitFieldPattern);
Expand Down
Loading
Loading