Skip to content

Commit

Permalink
mingw sanity test in a path with spaces
Browse files Browse the repository at this point in the history
- test special paths both for the install path and the path where things are generated and compiled
- TODO! add some test with a path with special chars (doesn't work yet via groovy)
  • Loading branch information
adrpo committed Jun 12, 2020
1 parent c3a28bc commit b8c9771
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .CI/common.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ void buildOMC(CC, CXX, extraFlags) {
echo cd \${MSYS_WORKSPACE}
echo make -f Makefile.omdev.mingw \${MAKETHREADS} BUILDTYPE=Release all-runtimes
echo echo Check that omc can be started and a model can be build for NF OF with runtimes C Cpp FMU
echo echo Attempt to build things using \$OPENMODELICAHOME
echo ./build/bin/omc --version
echo mkdir .sanity-check
echo cd .sanity-check
Expand All @@ -193,6 +194,34 @@ void buildOMC(CC, CXX, extraFlags) {
echo rm -rf .sanity-check
echo cd testsuite/flattening/libraries/biochem
echo ../../../rtest --return-with-error-code EnzMM.mos
echo echo Testing if we can compile in a path with spaces
echo cd \${MSYS_WORKSPACE}
echo mkdir -p ./path\\ with\\ space/
echo mv build ./path\\ with\\ space/
echo export OPENMODELICAHOME="\${MSYS_WORKSPACE}/path with space/build"
echo export OPENMODELICALIBRARY="\${MSYS_WORKSPACE}/path with space/build/lib/omlibrary"
echo echo Attempt to build things using \$OPENMODELICAHOME
echo ./path\\ with\\ space/build/bin/omc --version
echo cd ./path\\ with\\ space/
echo mkdir .sanity-check
echo cd .sanity-check
echo cp ../../testsuite/sanity-check/testSanity.mos .
echo ../build/bin/omc --linearizationDumpLanguage=matlab testSanity.mos
echo export PATH=\$PATH:../build/bin/:../build/lib/omc/omsicpp:../build/lib/omc/cpp
echo ./M
echo ./M -l=1.0
echo ls linear_M.m
echo ls M.fmu
echo rm -rf M* OMCppM* linear_M*
echo ../build/bin/omc --simCodeTarget=Cpp testSanity.mos
echo ./M
echo ls M.fmu
echo rm -rf M* OMCppM*
echo cd ..
echo rm -rf .sanity-check
echo mv build/ ../.
echo cd ../../
echo rm -rf ./path\\ with\\ space/
) > buildOMCWindows.sh
set MSYSTEM=MINGW64
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ OMPublicKey/
OMPython/
OMSetup/
OpenModelicaSetup/
trace.txt

0 comments on commit b8c9771

Please sign in to comment.