Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineGautier committed May 18, 2023
1 parent 093d758 commit 1cea147
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 6 additions & 0 deletions Buildings/Resources/Scripts/travis/dymola/dymola
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
cur_dir=`pwd`
bas_nam=`basename ${cur_dir}`
sha_dir=`dirname ${cur_dir}`

echo 'DEBUG: Content of bas_nam'
ls $bas_nam
echo 'DEBUG: Content of sha_dir'
ls $sha_dir

# If the current directory is part of the argument list,
# replace it with . as the docker may have a different file structure
arg_lis=`echo $@ | sed -e "s|${cur_dir}|.|g"`
Expand Down
9 changes: 2 additions & 7 deletions Buildings/Resources/Scripts/travis/templates/BoilerPlant.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,16 +289,11 @@ def simulateCase(arg, simulator):
cwd = os.getcwd()
output_dir_path = tempfile.mkdtemp(prefix=output_dir_prefix, dir=cwd)

# The following makes dymola worker cd into outputDirectory.
s = Simulator(arg[0], outputDirectory=os.path.relpath(output_dir_path))

if simulator == 'Dymola':
s = Simulator(arg[0], outputDirectory=os.path.relpath(output_dir_path), packagePath=os.path.abspath(cwd))
s.addPreProcessingStatement(r'Advanced.TranslationInCommandLog:=true;')
s.addPreProcessingStatement(r'cd')
print(os.getcwd())
print(os.listdir(os.pardir))
s.addPreProcessingStatement(r'openModel(path="../package.mo", changeDirectory=false);')
if simulator == 'Optimica':
s = Simulator(arg[0], outputDirectory=os.path.relpath(output_dir_path))
# Set MODELICAPATH (only in child process, so this won't affect main process).
os.environ['MODELICAPATH'] = os.path.abspath(os.path.pardir)

Expand Down

0 comments on commit 1cea147

Please sign in to comment.