forked from OpenModelica/OpenModelicaLibraryTesting
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprecompile_skript.jl
More file actions
34 lines (31 loc) · 801 Bytes
/
precompile_skript.jl
File metadata and controls
34 lines (31 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using TestBaseModelica
# Collect all .bmo files from examples directory
examples = [
(splitext(basename(file))[1], file) for file in filter(
f -> endswith(f, ".bmo"),
readdir(joinpath(@__DIR__, "examples"), join=true)
)
]
solver_settings = SolverSettings(
start_time = 0.0,
stop_time = 1.0,
interval = 0.02,
tolerance = 1e-6
)
for (modelname, bmo_file) in examples
output_directory = "tmp_out_dir"
test_settings = TestSettings(
modelname = modelname,
output_directory = output_directory,
solver_settings = solver_settings
)
try
@info "Running $modelname ..."
run_test(bmo_file; settings = test_settings)
@info "... done!"
catch err
@warn "... failed!"
showerror(stdout, err)
end
rm(output_directory, force=true, recursive=true)
end