From a4c8cde30260d1bb6c031e4dd4a1b58d101d0ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sj=C3=B6lund?= Date: Wed, 5 Aug 2026 14:00:24 +0200 Subject: [PATCH] Handle dygraphs missing in a docker image --- test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index e1b02b7..c97573d 100755 --- a/test.py +++ b/test.py @@ -285,7 +285,10 @@ def timeSeconds(f): if not docker: omc.sendExpression('setModelicaPath("%s")' % (librariespath.replace('\\','/') + MSLpath,)) omc_exe=os.path.normpath(os.path.join(omhome,"bin","omc")) -dygraphs=os.path.normpath(os.path.join(ompython_omhome or omhome,"share","doc","omc","testmodels","dygraph-combined.js")) +dygraphs="" +for p in os.path.normpath(os.path.join(ompython_omhome or omhome,"share","doc","omc","testmodels","dygraph-combined.js")): + if os.path.exists(dygraphs): # docker images strip /usr/share/doc from the image... + dygraphs = p print(omc_exe,omc_version,dygraphs) sys.stdout.flush() @@ -1158,7 +1161,7 @@ def cpu_name(): check_output_log(["rsync", "-aR", "emptydir/", result_location_libname]) check_output_log(["rsync", "-aR", "emptydir/", result_location_libname+"/files"]) check_output_log(["rsync", "-aR", "--delete-excluded", "--include-from=%s.files" % libname, "--exclude=*", "./", result_location_libname]) - if (conf.get("referenceFiles") or "") != "": + if (conf.get("referenceFiles") or "") != "" and dygraphs: check_output_log(["rsync", "-a", dygraphs, result_location_libname+"/files"]) else: print("No Sync: result_location [%s] != "" and not isWin [%s] and not noSync [%s] : library: %s" % (result_location, isWin, noSync, libname))